1.2.0 • Published 5 years ago

virdo v1.2.0

Weekly downloads
2
License
MIT
Repository
github
Last release
5 years ago

virdo

Virtually run JS scripts

What?

What this is:

  • An actual, honest to God, JS sandbox.

What this is not:

  • eval
  • A subprocess running node with low priviliges.
  • A find-and-replace blackbox.
  • An actual, honest to God, JS sandbox with 100% language spec compliance.
    • Some minor features are not supported yet (such as classes and this).

Usage

const js = require('virdo');
console.log(
  js(`
  let a = 4;
  if (false) {
    a++;
  }
  a;
`)
); // this prints out 4

js(`print(4)`, { print: console.log }); // prints 4
1.2.0

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago