babel-plugin-minify-number-cast

    1.0.0 • Public • Published

    babel-plugin-minify-number-cast

    Turns number cast from Number(a) to +a

    Example

    In

    Number();
    Number(1);
    Number(a);

    Out

    0;
    1;
    +a;

    Installation

    $ npm install babel-plugin-minify-number-cast

    Usage

    Via .babelrc (Recommended)

    .babelrc

    {
      "plugins": ["minify-number-cast"]
    }

    Via CLI

    $ babel --plugins minify-number-cast script.js

    Via Node API

    require("babel-core").transform("code", {
      plugins: ["minify-number-cast"]
    });

    Keywords

    Install

    npm i babel-plugin-minify-number-cast

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • sebmck
    • hzoo