setflags

Set v8 command line flags at runtime

setflags

Set v8 command line flags at runtime, which would theoretically let you enable harmony features at runtime.

Either a string or an array of strings as if you had passed them on the command line to node.

Allows you to require a module as if harmony features were enabled, this implies the target module will be loaded in a new context.

  • '--harmony_collections'
  • '--harmony_modules'
  • '--harmony_proxies'
  • '--harmony_scoping'
  • '--harmony_typeof'
var sf = require('setflags');
sf.harmonyRequire('./test-harmony');
'use strict';
let x = '100';
console.log('x', x);
exports.wm = new WeakMap();

MIT