javascript 0.3.0

A JavaScript engine implementation in Rust
Documentation
1
2
3
4
5
6
7
8
9
10
// feature probe for 'DataView'
try {
  if (typeof DataView === 'undefined') throw new Error('DataView missing');
  var view = new DataView(new ArrayBuffer(8));
  if (!view || typeof view !== 'object') throw new Error('DataView construction failed');
  if (view.byteLength !== 8) throw new Error('DataView byteLength mismatch');
  console.log('OK');
} catch (_) {
  console.log('NO');
}