* Support for NumericLiteralSeparator, Stage 1 feature commit cd8f6e062876261a334d968f875e477a48927b6d Author: Sven SAULEAU <xtuc@users.noreply.github.com> Date: Wed May 31 16:14:15 2017 +0200 docs: update README [skip ci] commit cf013e3382bf73cdf9224026c1ec0b1a368cfef2 Author: Rick Waldron <waldron.rick@gmail.com> Date: Tue May 30 14:51:20 2017 -0400 Support for NumericLiteralSeparator, Stage 1 feature Signed-off-by: Rick Waldron <waldron.rick@gmail.com> Signed-off-by: Rick Waldron <waldron.rick@gmail.com> * add note about presets [skip ci]
37 lines
557 B
Markdown
37 lines
557 B
Markdown
# babel-plugin-syntax-numeric-separator
|
|
|
|
> Allow parsing of Numeric Literals (Decimal, Binary, Hex and Octal) that contain a _NumericLiteralSeparator_.
|
|
|
|
|
|
## Installation
|
|
|
|
```sh
|
|
npm install --save-dev babel-plugin-syntax-numeric-separator
|
|
```
|
|
|
|
## Usage
|
|
|
|
### Via `.babelrc` (Recommended)
|
|
|
|
**.babelrc**
|
|
|
|
```json
|
|
{
|
|
"plugins": ["syntax-numeric-separator"]
|
|
}
|
|
```
|
|
|
|
### Via CLI
|
|
|
|
```sh
|
|
babel --plugins syntax-numeric-separator script.js
|
|
```
|
|
|
|
### Via Node API
|
|
|
|
```javascript
|
|
require("babel-core").transform("code", {
|
|
plugins: ["syntax-numeric-separator"]
|
|
});
|
|
```
|