babel-plugin-minify-type-constructors
Note: Not recommended if full support for IE8 and lower is required. Details
Example
In
Booleanx;Numberx;Stringx;Array3;Array31;Objectfoo: 'bar';
Out
!!x;+x;x + "";;3 1;foo: 'bar';
Installation
npm install babel-plugin-minify-type-constructors --save-dev
Usage
.babelrc
(Recommended)
Via .babelrc
Via CLI
babel --plugins minify-type-constructors script.js
Via Node API
;
Options
array
- prevent plugin from minifying arraysboolean
- prevent plugin from minifying booleansnumber
— prevent plugin from minifying numbersobject
— prevent plugin from minifying objectsstring
— prevent plugin from minifying strings