🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

babel-plugin-minify-type-constructors

Package Overview
Dependencies
Maintainers
3
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-type-constructors - npm Package Compare versions

Comparing version

to
0.0.2

2

lib/index.js

@@ -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 @@