Switch branches/tags
Find file History
boopathi Publish
 - babel-helper-evaluate-path@0.4.3
 - babel-helper-flip-expressions@0.4.3
 - babel-helper-is-void-0@0.4.3
 - babel-helper-mark-eval-scopes@0.4.3
 - babel-helper-remove-or-void@0.4.3
 - babel-helper-to-multiple-sequence-expressions@0.4.3
 - babel-minify@0.4.3
 - babel-plugin-minify-builtins@0.4.3
 - babel-plugin-minify-constant-folding@0.4.3
 - babel-plugin-minify-dead-code-elimination@0.4.3
 - babel-plugin-minify-flip-comparisons@0.4.3
 - babel-plugin-minify-guarded-expressions@0.4.3
 - babel-plugin-minify-infinity@0.4.3
 - babel-plugin-minify-mangle-names@0.4.3
 - babel-plugin-minify-numeric-literals@0.4.3
 - babel-plugin-minify-replace@0.4.3
 - babel-plugin-minify-simplify@0.4.3
 - babel-plugin-minify-type-constructors@0.4.3
 - babel-plugin-transform-inline-consecutive-adds@0.4.3
 - babel-plugin-transform-inline-environment-variables@0.4.3
 - babel-plugin-transform-member-expression-literals@6.9.4
 - babel-plugin-transform-merge-sibling-variables@6.9.4
 - babel-plugin-transform-minify-booleans@6.9.4
 - babel-plugin-transform-node-env-inline@0.4.3
 - babel-plugin-transform-property-literals@6.9.4
 - babel-plugin-transform-regexp-constructors@0.4.3
 - babel-plugin-transform-remove-console@6.9.4
 - babel-plugin-transform-remove-debugger@6.9.4
 - babel-plugin-transform-remove-undefined@0.4.3
 - babel-plugin-transform-simplify-comparison-operators@6.9.4
 - babel-plugin-transform-undefined-to-void@6.9.4
 - babel-preset-minify@0.4.3
 - gulp-babel-minify@0.4.3
Latest commit 6889f45 May 14, 2018
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
__tests__ Move tests to fixtures - numeric-literals Nov 9, 2017
src chore(deps): upgrade deps (#765) Dec 20, 2017
.npmignore Add numeric literals minification (#222) Oct 26, 2016
README.md add --save-dev to all packages' install instruction (#833) [skip ci] May 5, 2018
package.json Publish May 14, 2018

README.md

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"]
});