Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

babel-plugin-minify-builtins

babel1.2mMIT0.5.0

Minify Standard built-in Objects

babel-plugin, transform-built-ins

readme

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

.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)