Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-reserved-words

Package Overview
Dependencies
Maintainers
5
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-reserved-words - npm Package Compare versions

Comparing version 7.0.0-beta.49 to 7.0.0-beta.50

8

package.json
{
"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)
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc