New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
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 0.0.1 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 @@

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