babel-plugin-minify-type-constructors
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -19,3 +19,3 @@ "use strict"; | ||
if (typeof result.value === "number") { | ||
if (result.value <= 6) { | ||
if (result.value >= 0 && result.value <= 6 && result.value % 1 === 0) { | ||
// "Array(7)" is shorter than "[,,,,,,,]" | ||
@@ -22,0 +22,0 @@ path.replaceWith(t.arrayExpression(Array(result.value).fill(null))); |
{ | ||
"name": "babel-plugin-minify-type-constructors", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/babel/babili#readme", |
@@ -13,2 +13,5 @@ # babel-plugin-minify-type-constructors | ||
String(x); | ||
Array(3); | ||
Array(3,1); | ||
Object({foo: 'bar'}); | ||
``` | ||
@@ -22,2 +25,5 @@ | ||
x + ""; | ||
[,,,]; | ||
[3, 1]; | ||
{foo: 'bar'}; | ||
``` | ||
@@ -24,0 +30,0 @@ |
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
5811
60
1