A new stable release of Node.js (0.12) has landed recently with an upgraded Google's v8 JavaScript engine, v3.28.73.
What ECMAScript 6 features are currently present in Node.js, without using the --harmony
flag?
I have checked several sites claiming to list the ES 6 features but all of them seem out of date - most prominently, this table (Update: now updated with current Node.js status as of 0.12), because several of the features are listed as requiring the --harmony
flag while I found some of them being enabled by default (Maps, Sets, Symbols, to name a few). Update: Node specific tables have since been made available
Also, trying to google this information purely for the v8 engine gives too up-to-date information - current v8 release is 4.2.*, which is quite ahead of what Node.js uses.
My hopes are that this question (and its answers) will become a comprehensive summary on what ES 6 features are now available to Node.js developers.
ES 6 features enabled in Node.js 0.12 I currently know of:
- Maps, Sets / WeakMaps, WeakSets
- Symbols
- Object.observe
- Promises
- Number
- .isInteger
- .isSafeInteger
- .isNaN
- .EPSILON
- .MIN_SAFE_INTEGER
- .MAX_SAFE_INTEGER
- Math
- .clz32
- .imul
- .sign
- .log10
- .log2
- .log1p
- .expm1
- .cosh
- .sinh
- .tanh
- .acosh
- .asinh
- .atanh
- .trunc
- .fround
- .cbrt
- .hypot