Socket
Socket
Sign inDemoInstall

babel-plugin-minify-guarded-expressions

Package Overview
Dependencies
Maintainers
5
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-guarded-expressions

## Example


Version published
Weekly downloads
293K
decreased by-21.97%
Maintainers
5
Weekly downloads
 
Created
Source

babel-plugin-minify-guarded-expressions

Example

In

!x && foo();
alert(0 && new Foo());

Out

x || foo();
alert(0);

Installation

npm install babel-plugin-minify-guarded-expressions --save-dev

Usage

.babelrc

{
  "plugins": ["minify-guarded-expressions"]
}

Via CLI

babel --plugins minify-guarded-expressions script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["minify-guarded-expressions"]
});

Keywords

FAQs

Package last updated on 16 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