Socket
Socket
Sign inDemoInstall

babel-plugin-minify-type-constructors

Package Overview
Dependencies
Maintainers
5
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

**Note:** Not recommended if full support for IE8 and lower is required. [Details](https://github.com/babel/minify/pull/45#discussion_r70181249)


Version published
Weekly downloads
362K
decreased by-3.57%
Maintainers
5
Weekly downloads
 
Created
Source

babel-plugin-minify-type-constructors

Note: Not recommended if full support for IE8 and lower is required. Details

Example

In

Boolean(x);
Number(x);
String(x);
Array(3);
Array(3,1);
Object({foo: 'bar'});

Out

!!x;
+x;
x + "";
[,,,];
[3, 1];
{foo: 'bar'};

Installation

npm install babel-plugin-minify-type-constructors --save-dev

Usage

.babelrc

{
  "plugins": ["minify-type-constructors"]
}

Via CLI

babel --plugins minify-type-constructors script.js

Via Node API

require("@babel/core").transform("code", {
  plugins: ["minify-type-constructors"]
});

Options

  • array - prevent plugin from minifying arrays
  • boolean - prevent plugin from minifying booleans
  • number — prevent plugin from minifying numbers
  • object — prevent plugin from minifying objects
  • string — prevent plugin from minifying strings

Keywords

FAQs

Package last updated on 14 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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