Ready to take your JavaScript development to the next level? Meet npm Enterprise - the ultimate in enterprise JavaScript. Learn more »

babel-plugin-minify-numeric-literals

0.4.3 • Public • Published

babel-plugin-minify-numeric-literals

Shortening of numeric literals via scientific notation

Example

In

[1000, -20000]

Out

[1e3, -2e4]

Installation

npm install babel-plugin-minify-numeric-literals --save-dev

Usage

Via .babelrc (Recommended)

.babelrc

{
  "plugins": ["minify-numeric-literals"]
}

Via CLI

babel --plugins minify-numeric-literals script.js

Via Node API

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

install

npm i babel-plugin-minify-numeric-literals

Downloadsweekly downloads

759,481

version

0.4.3

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
Report a vulnerability