Babel preset to make node@5 fully ES2015 compatible.
Node@5 has great ES2015 support, this module just adds missing features:
- destructuring assignment (transform-es2015-destructuring)
- rest & default parameters (transform-es2015-parameters)
- modules (transform-es2015-modules-commonjs)
- unicode & sticky regular expressions (transform-es2015-sticky-regex & transform-es2015-unicode-regex)
- better function name support (transform-es2015-function-name)
- fix reserved words in shorthand properties transform-es2015-shorthand-properties
npm install --save-dev babel-preset-es2015-node5
Read "Configuring Babel 6" article for more information about babel@6 configuration.
.babelrc
{
"presets": ["es2015-node5"]
}
babel script.js --presets es2015-node5
require('babel-core').transform('code', {
presets: ['es2015-node5'],
})