babel-plugin-transform-inline-consecutive-adds
Advanced tools
Comparing version 0.0.2 to 0.1.0
@@ -137,6 +137,5 @@ "use strict"; | ||
return rval.node.end - rval.node.start + 1; | ||
}) // add 1 for space in front | ||
.reduce(function (a, b) { | ||
}).reduce(function (a, b) { | ||
return a + b; | ||
}, 0); // sum | ||
}, 0); // add 1 for space in front // sum | ||
@@ -143,0 +142,0 @@ return numCommaAdded + sizeOfRvals < statementsLength; |
@@ -145,3 +145,3 @@ "use strict"; | ||
return references.some(function (r) { | ||
return r.isDescendant(expr); | ||
return r === expr || r.isDescendant(expr); | ||
}); | ||
@@ -184,3 +184,9 @@ }; | ||
// some collapses may increase the size | ||
if (!collapser.isSizeSmaller({ newInit, oldInit, varDecl, assignments, statements })) { | ||
if (!collapser.isSizeSmaller({ | ||
newInit, | ||
oldInit, | ||
varDecl, | ||
assignments, | ||
statements | ||
})) { | ||
return; | ||
@@ -187,0 +193,0 @@ } |
@@ -57,3 +57,3 @@ "use strict"; | ||
} | ||
if (checkReference(args)) { | ||
if (checkReference(args[0])) { | ||
return false; | ||
@@ -60,0 +60,0 @@ } |
{ | ||
"name": "babel-plugin-transform-inline-consecutive-adds", | ||
"version": "0.0.2", | ||
"version": "0.1.0", | ||
"description": "This plugin inlines consecutive property assignments, array pushes, etc.", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/babel/babili#readme", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
27033
563