@babel/plugin-transform-reserved-words
Advanced tools
Comparing version 7.0.0-beta.49 to 7.0.0-beta.50
{ | ||
"name": "@babel/plugin-transform-reserved-words", | ||
"version": "7.0.0-beta.49", | ||
"version": "7.0.0-beta.50", | ||
"description": "Ensure that no reserved words are used.", | ||
@@ -12,3 +12,3 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-reserved-words", | ||
"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" | ||
} | ||
} |
# @babel/plugin-transform-reserved-words | ||
> Renames variables that are reserved words in ES3 but not ES5+ | ||
> Ensure that no reserved words are used. | ||
Some words were reserved in ES3 as potential future keywords but were not | ||
reserved in ES5 and later. This plugin, to be used when targeting ES3 | ||
environments, renames variables from that set of words. | ||
See our website [@babel/plugin-transform-reserved-words](https://new.babeljs.io/docs/en/next/babel-plugin-transform-reserved-words.html) for more information. | ||
## Example | ||
## Install | ||
**In** | ||
Using npm: | ||
```javascript | ||
var abstract = 1; | ||
var x = abstract + 1; | ||
``` | ||
**Out** | ||
```javascript | ||
var _abstract = 1; | ||
var x = _abstract + 1; | ||
``` | ||
## Installation | ||
```sh | ||
npm install --save-dev @babel/plugin-transform-reserved-words | ||
npm install --save @babel/plugin-transform-reserved-words | ||
``` | ||
## Usage | ||
or using yarn: | ||
### Via `.babelrc` (Recommended) | ||
**.babelrc** | ||
```json | ||
{ | ||
"plugins": ["@babel/plugin-transform-reserved-words"] | ||
} | ||
``` | ||
### Via CLI | ||
```sh | ||
babel --plugins @babel/plugin-transform-reserved-words script.js | ||
yarn add --save @babel/plugin-transform-reserved-words | ||
``` | ||
### Via Node API | ||
```javascript | ||
require("@babel/core").transform("code", { | ||
plugins: ["@babel/plugin-transform-reserved-words"] | ||
}); | ||
``` | ||
## References | ||
* [ES3 Spec: Future Reserved Words](http://www.ecma-international.org/publications/files/ECMA-ST-ARCH/ECMA-262,%203rd%20edition,%20December%201999.pdf#page=26) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1751
3
20
+ Added@babel/helper-plugin-utils@7.0.0-beta.50(transitive)
- Removed@babel/helper-plugin-utils@7.0.0-beta.49(transitive)