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

babel-plugin-minify-simplify

Package Overview
Dependencies
Maintainers
4
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-simplify - npm Package Compare versions

Comparing version 0.0.5 to 0.0.6

4

lib/index.js

@@ -267,2 +267,6 @@ "use strict";

if (path.node.operator !== "=") {
return;
}
var canBeUpdateExpression = rightExpr.get("right").isNumericLiteral() && rightExpr.get("right").node.value === 1 && updateOperators.has(rightExpr.node.operator);

@@ -269,0 +273,0 @@

6

package.json
{
"name": "babel-plugin-minify-simplify",
"version": "0.0.5",
"version": "0.0.6",
"description": "",

@@ -15,7 +15,7 @@ "homepage": "https://github.com/babel/babili#readme",

"dependencies": {
"babel-helper-flip-expressions": "^0.0.1",
"babel-helper-flip-expressions": "^0.0.2",
"babel-helper-is-nodes-equiv": "^0.0.1",
"babel-helper-to-multiple-sequence-expressions": "^0.0.2"
"babel-helper-to-multiple-sequence-expressions": "^0.0.3"
},
"devDependencies": {}
}
# babel-plugin-minify-simplify
This plugin will transform code in mainly two ways:
> Simplifies code for minification by reducing statements into expressions and making expressions uniform where possible.
1. Reduce as much statements as possible into expressions
## Example
### Reduce statement into expression
**In**
```js

@@ -19,2 +22,3 @@ function foo() {

**Out**
```js

@@ -29,5 +33,6 @@ function foo() {

2. Make expressions as uniform as possible for better compressibility
### Make expression as uniform as possible for better compressibility
**In**
```js

@@ -40,2 +45,3 @@ undefined

**Out**
```js

@@ -51,3 +57,3 @@ void 0

```sh
$ npm install babel-plugin-minify-simplify
npm install babel-plugin-minify-simplify
```

@@ -70,3 +76,3 @@

```sh
$ babel --plugins minify-simplify script.js
babel --plugins minify-simplify script.js
```

@@ -73,0 +79,0 @@

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