Provides a simple interface for running untrusted code.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
tests
.travis.yml
README.md
_example.js
_sandbox_runner.js
license.txt
package.json
sandboxer.js

README.md

Build Status

Install

git clone git@github.com:my8bird/nodejs-sandbox.git
cd nodejs-sandbox
npm link

Usage

var sandboxer = require("nodejs-sandbox");
var sandbox = new sandbox.Sandbox();
sandbox.runSandboxed({code: 'console.log("fubar");'});

// To detect phases
sandbox.on('start',  function() {console.log('start'); });
sandbox.on('finish', function() {console.log('finish'); });

@see _example.js for running code.