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
5
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.3.0-alpha.a7421897 to 0.3.0-alpha.ab81368f

11

lib/conditional-expression.js

@@ -27,4 +27,3 @@ "use strict";

var _h$typeSymbols = h.typeSymbols(t),
EX = _h$typeSymbols.Expression,
LE = _h$typeSymbols.LogicalExpression;
EX = _h$typeSymbols.Expression;

@@ -36,10 +35,6 @@ // Convention:

var matcher = new PatternMatch([[LE, true, false, function (e) {
return e;
}], [EX, true, false, function (e) {
var matcher = new PatternMatch([[EX, true, false, function (e) {
return notnot(e);
}], [EX, false, true, function (e) {
return not(e);
}], [LE, true, EX, function (e, c, a) {
return or(e, a);
}], [EX, true, EX, function (e, c, a) {

@@ -51,4 +46,2 @@ return or(notnot(e), a);

return or(not(e), c);
}], [LE, EX, false, function (e, c) {
return and(e, c);
}], [EX, EX, false, function (e, c) {

@@ -55,0 +48,0 @@ return and(notnot(e), c);

17

lib/helpers.js

@@ -8,13 +8,16 @@ "use strict";

// Types as Symbols - for comparing types
// init must be empty object -
// computing this involves checking object.keys() to be of length 0
// skipped otherwise
var types = {};
// This is a test key which is used to avoid Object.keys check
// Object.keys() check is really expensive
// https://gist.github.com/vigneshshanmugam/c766550ecd02292dcdfbf0bf013b9d3d
var testKey = "Expression";
var typeSymbols = function typeSymbols(t) {
// don't recompute
if (Object.keys(types).length < 1) {
t.TYPES.forEach(function (type) {
types[type] = Symbol.for(type);
});
if (types[testKey] !== undefined) {
return types;
}
t.TYPES.forEach(function (type) {
types[type] = Symbol.for(type);
});
return types;

@@ -21,0 +24,0 @@ };

@@ -502,12 +502,2 @@ "use strict";

node.body = statements;
// this additional traversal is horrible but it's done to fix
// https://github.com/babel/minify/issues/323
// in which type annotation somehow gets messed up
// during sequence expression transformation
path.traverse({
Identifier: function Identifier(path) {
path.getTypeAnnotation();
}
});
},

@@ -514,0 +504,0 @@

{
"name": "babel-plugin-minify-simplify",
"version": "0.3.0-alpha.a7421897",
"version": "0.3.0-alpha.ab81368f",
"description": "",

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

"dependencies": {
"babel-helper-flip-expressions": "^0.3.0-alpha.a7421897",
"babel-helper-flip-expressions": "^0.3.0-alpha.ab81368f",
"babel-helper-is-nodes-equiv": "^0.0.1",
"babel-helper-to-multiple-sequence-expressions": "^0.3.0-alpha.a7421897"
"babel-helper-to-multiple-sequence-expressions": "^0.3.0-alpha.ab81368f"
}
}
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