node/lib/vm.js

12 lines
399 B
JavaScript
Raw Normal View History

var binding = process.binding('evals');
exports.Script = binding.Script;
2010-12-02 12:59:06 +08:00
exports.createScript = function(code, ctx, name) {
return new exports.Script(code, ctx, name);
};
exports.createContext = binding.Script.createContext;
exports.runInContext = binding.Script.runInContext;
exports.runInThisContext = binding.Script.runInThisContext;
exports.runInNewContext = binding.Script.runInNewContext;