ES6 on io.js

io.js is built against modern versions of V8. By keeping up-to-date with the latest releases of this engine we ensure new features from the JavaScript ECMA-262 specification are brought to io.js developers in a timely manner, as well as continued performance and stability improvements.

Version 1.2.0 of io.js ships with V8 4.1.0.14, which includes ES6 features well beyond version 3.28.73 that ship with Node.js™ 0.12.x.

No more --harmony flag

On Node.js™@0.12.x (V8 3.28+), the --harmony runtime flag enables all completed, staged and in progress ES6 features together, in bulk (with the exception of proxies which are hidden under --harmony-proxies). This means that some really buggy or even broken features like Arrow Functions are just as readily available for developers as generators, which have very little or even no known-issues. As such, most developers tend to enable only certain features by using specific runtime harmony feature flags (e.g. --harmony-generators), or simply enable all of them and then use a restricted subset.

With io.js@1.x (V8 4.1+), all that complexity goes away. All harmony features are now logically split into three groups for shipping, staged and in progress features:

Which ES6 features ship with io.js by default (no runtime flag required)?

You can view a more detailed list, including a comparison with other engines, on the compat-table project page.

Which ES6 features are behind the --es_staging flag?

Which ES6 features are in progress?

New features are constantly being added to the V8 engine. Generally speaking, expect them to land on a future io.js release, although timing is unknown.

You may list all the in progress features available on each io.js release by grepping through the --v8-options argument. Please note that these are incomplete and possibly broken features of V8, so use them at your own risk:

iojs --v8-options | grep "in progress"

I have my infrastructure set up to leverage the --harmony flag. Should I remove it?

The current behaviour of the --harmony flag on io.js is to enable staged features only. After all, it is now a synonym of --es_staging. As mentioned above, these are completed features that have not been considered stable yet. If you want to play safe, especially on production environments, consider removing this runtime flag until it ships by default on V8 and, consequently, on io.js. If you keep this enabled, you should be prepared for further io.js upgrades to break your code if V8 changes their semantics to more closely follow the standard.

How do I find which version of V8 ships with a particular version of io.js?

io.js provides a simple way to list all dependencies and respective versions that ship with a specific binary through the process global object. In case of the V8 engine, type the following in your terminal to retrieve its version:

iojs -p process.versions.v8