Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-reserved-words

Package Overview
Dependencies
Maintainers
5
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-reserved-words

Ensure that no reserved words are used.


Version published
Weekly downloads
22M
decreased by-1.3%
Maintainers
5
Weekly downloads
 
Created
Source

@babel/plugin-transform-reserved-words

Renames variables that are reserved words in ES3 but not ES5+

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.

Example

In

var abstract = 1;
var x = abstract + 1;

Out

var _abstract = 1;
var x = _abstract + 1;

Installation

npm install --save-dev @babel/plugin-transform-reserved-words

Usage

.babelrc

{
  "plugins": ["@babel/plugin-transform-reserved-words"]
}

Via CLI

babel --plugins @babel/plugin-transform-reserved-words script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["@babel/plugin-transform-reserved-words"]
});

References

  • ES3 Spec: Future Reserved Words

Keywords

FAQs

Package last updated on 15 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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