Skip to content

Instantly share code, notes, and snippets.

@chadwhitacre
Last active December 12, 2015 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chadwhitacre/4772970 to your computer and use it in GitHub Desktop.
Save chadwhitacre/4772970 to your computer and use it in GitHub Desktop.
var q = require('q'),
vm = require('vm'),
ctx = vm.createContext(),
script = vm.createScript("now = 1;");
script.runInContext(ctx);
console.log(ctx.now);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment