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

babel-plugin-closure-elimination

Package Overview
Dependencies
Maintainers
2
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-closure-elimination - npm Package Compare versions

Comparing version 1.0.3 to 1.0.4

test/fixtures/assign-expression-and-referenced.js

2

lib/index.js

@@ -32,3 +32,3 @@ 'use strict';

// direct references that we need to track to hoist this to the highest scope we can
if (path.isReferenced()) {
if (path.isReferenced() || path.parent.type == 'AssignmentExpression') {
var bindingInfo = scope.getBinding(node.name);

@@ -35,0 +35,0 @@

{
"name": "babel-plugin-closure-elimination",
"version": "1.0.3",
"version": "1.0.4",
"description": "Removes closures from your JavaScript in the name of performance.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -18,3 +18,3 @@ /**

// direct references that we need to track to hoist this to the highest scope we can
if (path.isReferenced()) {
if (path.isReferenced() || path.parent.type == 'AssignmentExpression') {
const bindingInfo = scope.getBinding(node.name);

@@ -21,0 +21,0 @@

@@ -133,3 +133,6 @@ import Plugin from '../src';

eliminate("create-class", 1);
eliminate("assign-expression", 3, [ 3, 2, "yo", 2, 1 ]);
eliminate("assign-expression-and-referenced", 0, [ 1, [ 1, 1 ], [ 123 ] ]);
eliminate("possible-scope-hoisting", 0/*TODO bar may be hoisted at 1 level*/, [1]);
});

Sorry, the diff of this file is not supported yet

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