@babel/plugin-transform-literals
Advanced tools
Comparing version 7.0.0-beta.49 to 7.0.0-beta.50
{ | ||
"name": "@babel/plugin-transform-literals", | ||
"version": "7.0.0-beta.49", | ||
"version": "7.0.0-beta.50", | ||
"description": "Compile ES2015 unicode string and number literals to ES5", | ||
@@ -12,3 +12,3 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-literals", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "7.0.0-beta.49" | ||
"@babel/helper-plugin-utils": "7.0.0-beta.50" | ||
}, | ||
@@ -19,5 +19,5 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "7.0.0-beta.49", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.49" | ||
"@babel/core": "7.0.0-beta.50", | ||
"@babel/helper-plugin-test-runner": "7.0.0-beta.50" | ||
} | ||
} |
@@ -5,50 +5,16 @@ # @babel/plugin-transform-literals | ||
## Example | ||
See our website [@babel/plugin-transform-literals](https://new.babeljs.io/docs/en/next/babel-plugin-transform-literals.html) for more information. | ||
**In** | ||
## Install | ||
```js | ||
var b = 0b11; // binary integer literal | ||
var o = 0o7; // octal integer literal | ||
const u = 'Hello\u{000A}\u{0009}!'; // unicode string literals, newline and tab | ||
``` | ||
Using npm: | ||
**Out** | ||
```js | ||
var b = 3; // binary integer literal | ||
var o = 7; // octal integer literal | ||
const u = 'Hello\n\t!'; // unicode string literals, newline and tab | ||
``` | ||
## Installation | ||
```sh | ||
npm install --save-dev @babel/plugin-transform-literals | ||
npm install --save @babel/plugin-transform-literals | ||
``` | ||
## Usage | ||
or using yarn: | ||
### Via `.babelrc` (Recommended) | ||
**.babelrc** | ||
```json | ||
{ | ||
"plugins": ["@babel/plugin-transform-literals"] | ||
} | ||
``` | ||
### Via CLI | ||
```sh | ||
babel --plugins @babel/plugin-transform-literals script.js | ||
yarn add --save @babel/plugin-transform-literals | ||
``` | ||
### Via Node API | ||
```javascript | ||
require("@babel/core").transform("code", { | ||
plugins: ["@babel/plugin-transform-literals"] | ||
}); | ||
``` |
1753
3
20
+ Added@babel/helper-plugin-utils@7.0.0-beta.50(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.49(transitive)