javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
// feature probe for 'Symbol.species'
try {
  if (typeof Symbol !== 'function') throw new Error('Symbol missing');
  if (typeof Symbol.species !== 'symbol') throw new Error('Symbol.species missing');
  const desc = Object.getOwnPropertyDescriptor(Symbol, 'species');
  if (!desc || desc.writable || desc.enumerable || desc.configurable) throw new Error('Symbol.species descriptor incorrect');
  console.log('OK');
} catch (e) {
  console.log('NO: ' + e.message);
}