Last Updated: February 25, 2016
·
4.117K
· jmar777

Enable all V8-implemented Harmony features in Node.js

E.g., to start the Node.js REPL with all harmony features enabled, run the following:

$ node `node --v8-options | grep harmony | cut -d ' ' -f | xargs`

You can now play around with some of the harmony features already implemented in V8. E.g., try the following:

> let wm = new WeakMap();
> let key = {};
> wm.set(key, 'foo');
> wm.get(key);
'foo'

Have a fresh tip? Share with Coderwall community!

Post
Post a tip
Did you know?

JavaScript on a page runs with the privileges of that origin. One altered library, tag manager, or snippet can read inputs, change what people see, and call your APIs as the user.

Security insights from Cside