Is there a JavaScript module, that can be installed in current versions of Node, that provides some ES6 features e.g. Map? (The version of Map provided by node --harmony
doesn't yet implement enough features to be useful.)
Asked
Active
Viewed 93 times
1

rwallace
- 31,405
- 40
- 123
- 242
-
1Is npmjs.org down for you? https://www.npmjs.org/search?q=es6 `->` https://www.npmjs.org/package/es6-collections – Felix Kling Aug 15 '14 at 17:04
-
@FelixKling Doesn't seem to work, e.g. when I import es6-collections, then `m = new Map()` followed by `m.keys()` it gives an error message, same as when I tried using the version provided by `node --harmony`, am I doing something wrong? – rwallace Aug 16 '14 at 19:01
-
Ah, checking the source, seems like mostly not implemented, and node probably use the same code. No worries, I'll just write my own. – rwallace Aug 16 '14 at 19:30
-
There are a number of projects. https://github.com/paulmillr/es6-shim/ is one of the more popular, and there is of course Traceur if you want any of the language features. es6-shim should have Map.keys() – lyschoening Aug 17 '14 at 07:27
1 Answers
0
This compatibility matrix should be of use.
Of particular interest, might be google's traceur compiler which will translate es6 code to es5 to run anywhere

willscripted
- 1,438
- 1
- 15
- 25