Socket
Socket
Sign inDemoInstall

babel-plugin-minify-constant-folding

Package Overview
Dependencies
Maintainers
5
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-constant-folding - npm Package Compare versions

Comparing version 0.3.0-alpha.e6a189cd to 0.3.0

23

lib/index.js

@@ -63,15 +63,22 @@ "use strict";

BinaryExpression(path) {
if (!path.isBinaryExpression({ operator: "+" })) {
return;
}
var literal = void 0,
bin = void 0;
if (path.get("right").isStringLiteral()) {
literal = path.get("right");
if (path.get("left").isBinaryExpression({ operator: "+" })) {
bin = path.get("left");
var left = path.get("left");
var right = path.get("right");
if (right.isStringLiteral()) {
literal = right;
if (left.isBinaryExpression({ operator: "+" })) {
bin = left;
} else {
return;
}
} else if (path.get("left").isStringLiteral()) {
literal = path.get("left");
if (path.get("right").isBinaryExpression({ operator: "+" })) {
bin = path.get("right");
} else if (left.isStringLiteral()) {
literal = left;
if (right.isBinaryExpression({ operator: "+" })) {
bin = right;
} else {

@@ -78,0 +85,0 @@ return;

{
"name": "babel-plugin-minify-constant-folding",
"version": "0.3.0-alpha.e6a189cd",
"version": "0.3.0",
"description": "",

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

"dependencies": {
"babel-helper-evaluate-path": "^0.3.0-alpha.e6a189cd"
"babel-helper-evaluate-path": "^0.3.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