package
JavaScript code execution context for the browser and wrapper around node vm module
npm install context-evalGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
Simple execution context for node and the browser. In node it just creates a new
context and runInContext in that context and in the browser it creates an
iframe and hangs on to it until destroy is called.
install:
npm install context-evalUse with browserify or node.
to run the tests:
npm testtest in browsers:
npm install karma -g
karma startsandbox (optional) is an object that would be shallowly copied into the execution context.
parentElement (optional) is an element where the iframe can appended to, defautls to body.
Evaluates code and returns result.
Does nothing in node but removes iframe in browser.
Extend the global object with obj
Returns the global object
MIT