Socket
Socket
Sign inDemoInstall

babel-plugin-minify-dead-code-elimination

Package Overview
Dependencies
Maintainers
3
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.1.4 to 0.1.5

11

lib/index.js

@@ -50,3 +50,2 @@ "use strict";

Function: {
// Let's take all the vars in a function that are not in the top level scope and hoist them

@@ -367,3 +366,2 @@ // with the first var declaration in the top-level scope. This transform in itself may

if (binding.references === 1 && binding.kind !== "param" && binding.kind !== "module" && binding.constant) {
var replacement = binding.path.node;

@@ -379,3 +377,2 @@ var replacementPath = binding.path;

if (t.isVariableDeclarator(replacement)) {
var _prevSiblings = prevSiblings(replacementPath);

@@ -782,3 +779,3 @@

// `function.name` all minifiers do it and hence became a standard.
"FunctionExpression"(path) {
FunctionExpression(path) {
if (!this.keepFnName) {

@@ -790,3 +787,3 @@ removeUnreferencedId(path);

// remove class names
"ClassExpression"(path) {
ClassExpression(path) {
if (!this.keepClassName) {

@@ -817,3 +814,5 @@ removeUnreferencedId(path);

if (binding.path.parentPath.parentPath.isForInStatement({ left: binding.path.parent })) {
if (binding.path.parentPath.parentPath.isForInStatement({
left: binding.path.parent
})) {
return;

@@ -820,0 +819,0 @@ }

{
"name": "babel-plugin-minify-dead-code-elimination",
"version": "0.1.4",
"version": "0.1.5",
"description": "",

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

"dependencies": {
"babel-helper-mark-eval-scopes": "^0.0.3",
"babel-helper-remove-or-void": "^0.0.1",
"babel-helper-mark-eval-scopes": "^0.1.0",
"babel-helper-remove-or-void": "^0.1.0",
"lodash.some": "^4.6.0"

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