Node.js support for => (arrow function)

javascript, node.js

Solution

You can follow this issue: https://code.google.com/p/v8/issues/detail?id=2700

Currently (as 02.05.2014) arrow functions have been implemented and waiting until this functionality will be landed in v8: https://codereview.chromium.org/160073006/

After then we'll need to wait, until v8 version with arrow function would be integrated into Node.JS. You can follow Node.JS changelog there: https://github.com/joyent/node/blob/master/ChangeLog (search for "v8: upgrade to ....")

Problem

Is Node.js supporting => function keyword alias already? If yes, starting from which version? How to enable this language extension? ``` (function() { console.log('it works!') })() ``` Becomes ``` (() => { console.log('it works!') })() ```

Original source

Related problems