javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
11
function assert(condition, message) {
  if (!condition) {
    throw new Error(message || 'Assertion failed');
  }
}

assert(typeof __forOfValues === 'undefined', '__forOfValues should not be visible to scripts');
assert(
  !Object.prototype.hasOwnProperty.call(globalThis, '__forOfValues'),
  'globalThis should not expose __forOfValues'
);