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

babel-plugin-minify-dead-code-elimination

Package Overview
Dependencies
Maintainers
5
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-dead-code-elimination - npm Package Compare versions

Comparing version 0.4.1 to 0.4.2

15

lib/index.js

@@ -13,2 +13,7 @@ "use strict";

function evaluateTruthy(path) {
const res = evaluate(path);
if (res.confident) return !!res.value;
}
function prevSiblings(path) {

@@ -593,3 +598,3 @@ const parentPath = path.parentPath;

const node = path.node;
const evaluateTest = path.get("test").evaluateTruthy();
const evaluateTest = evaluateTruthy(path.get("test"));

@@ -736,3 +741,9 @@ if (evaluateTest === true) {

} else {
path.remove();
const init = path.get("init");
if (init.node && !init.isPure()) {
path.replaceWith(init);
} else {
path.remove();
}
}

@@ -739,0 +750,0 @@ }

8

package.json
{
"name": "babel-plugin-minify-dead-code-elimination",
"version": "0.4.1",
"version": "0.4.2",
"description": "",

@@ -15,7 +15,7 @@ "keywords": [

"dependencies": {
"babel-helper-evaluate-path": "^0.4.1",
"babel-helper-mark-eval-scopes": "^0.4.1",
"babel-helper-remove-or-void": "^0.4.1",
"babel-helper-evaluate-path": "^0.4.2",
"babel-helper-mark-eval-scopes": "^0.4.2",
"babel-helper-remove-or-void": "^0.4.2",
"lodash.some": "^4.6.0"
}
}

@@ -34,3 +34,3 @@ # babel-plugin-minify-dead-code-elimination

```sh
npm install babel-plugin-minify-dead-code-elimination
npm install babel-plugin-minify-dead-code-elimination --save-dev
```

@@ -37,0 +37,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