@bymiroslavsky/v8-sandbox
Installation
npm install --save @bymiroslavsky/v8-sandbox
Examples
import v8sandbox from '@bymiroslavsky/v8-sandbox';
const sandbox = new v8sandbox.Sandbox();
sandbox.setCode(`
var g = test + 1;
g;
`);
sandbox.setValue("test", 3);
console.log(sandbox.execute());