Skip to content

Commit

Permalink
fix(readme): correct usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
KlausTrainer committed Sep 4, 2016
1 parent 8827c85 commit 0efdc08
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ whitelist. If no whitelist is specified, we default to an empty whitelist.
## Usage

````javascript
var sandbox = require("./sandbox"),
whitelist = ["console"],
context = {require: require},
theAnswerFun = function() { return 42; },
consoleFun = function() { require("console").log("Hello World!"); },
httpFun = function() { return require("http").STATUS_CODES['200']; };
var sandbox = require('sandbox.js'),
whitelist = ['console'],
context = {require: require},
theAnswerFun = function() { return 42; },
consoleFun = function() { require('console').log('Hello World!'); },
httpFun = function() { return require('http').STATUS_CODES['200']; };

sandbox.runInSandbox(theAnswerFun); // => 42

Expand Down

0 comments on commit 0efdc08

Please sign in to comment.