javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
// feature probe for 'ShadowRealm'
try {
  if (typeof ShadowRealm !== 'function') throw new Error('ShadowRealm missing');
  var r = new ShadowRealm();
  if (r.evaluate('1 + 1') !== 2) throw new Error('evaluate failed');
  console.log('OK');
} catch (e) {
  console.log('NO');
}