babel-plugin-transform-es2015-literals
Compile ES2015 unicode string and number literals to ES5
Example
In
var b = 0b11;
var o = 0o7;
const u = 'Hello\u{000A}\u{0009}!';
Out
var b = 3;
var o = 7;
const u = 'Hello\n\t!';
Installation
npm install --save-dev babel-plugin-transform-es2015-literals
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["transform-es2015-literals"]
}
Via CLI
babel --plugins transform-es2015-literals script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["transform-es2015-literals"]
});