Socket
Book a DemoInstallSign in
Socket

babel-plugin-yui-compressor-fix-reserved-keywords

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-yui-compressor-fix-reserved-keywords

Babel plugin to automatically rename/fixup variable names, accessors and property names, and statements that trigger YUI compressor bugs.

0.0.1
latest
Source
npmnpm
Version published
Weekly downloads
1.1K
-14.19%
Maintainers
1
Weekly downloads
 
Created
Source

babel-plugin-yui-compressor-fix-reserved-keywords

Babel plugin to automatically rename/fixup variable names, accessors and property names, and statements that trigger YUI compressor bugs.

Note: it will not fixup stuff that is too new for YUI compressor to know about so you should add it late to your list of plugins.

Example

In

var short = function char() {
	debugger;
	return {
		default: 'yes'
	}.default;
}();

Out

var _short = function _char() {
	return {
		'default': 'yes'
	}['default'];
}();

Installation

$ npm install babel-plugin-yui-compressor-fix-reserved-keywords

Usage

.babelrc

{
  "plugins": ["yui-compressor-fix-reserved-keywords"]
}

Via CLI

$ babel --plugins yui-compressor-fix-reserved-keywords script.js

Via Node API

require("babel-core").transform("code", {
  plugins: ["yui-compressor-fix-reserved-keywords"]
});

Keywords

babel

FAQs

Package last updated on 09 Feb 2017

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.