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)
Last updated 7 years ago by boopathi .
MIT · Repository · Bugs · Original npm
$ cnpm install babel-plugin-minify-type-constructors 
SYNC missed versions from official npm registry.

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

Usage

Via .babelrc (Recommended)

.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

Current Tags

  • 0.4.3                                ...           latest (7 years ago)

2 Versions

  • 0.5.0-alpha.9                                ...           7 years ago
  • 0.4.3                                ...           7 years ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2013 - present © cnpmjs.org