Numerous Philanthropic Misanthropes

    babel-plugin-minify-builtins

    0.5.0 • Public • Published

    babel-plugin-minify-builtins

    Minify Standard built-in Objects

    Example

    In

    Math.floor(a) + Math.floor(b)

    Out

    var _Mathfloor = Math.floor;
     
    _Mathfloor(a) + _Mathfloor(b);

    Installation

    npm install babel-plugin-minify-builtins --save-dev

    Usage

    Via .babelrc (Recommended)

    .babelrc

    {
      "plugins": ["minify-builtins"]
    }

    Via CLI

    babel --plugins minify-builtins script.js

    Via Node API

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

    Options

    • tdz - Account for TDZ (Temporal Dead Zone)

    Install

    npm i babel-plugin-minify-builtins

    DownloadsWeekly Downloads

    691,778

    Version

    0.5.0

    License

    MIT

    Unpacked Size

    14 kB

    Total Files

    4

    Last publish

    Collaborators

    • hzoo
    • loganfsmyth
    • existentialism
    • nicolo-ribaudo
    • boopathi
    • vignesh.shanmugam