🚀 DAY 5 OF LAUNCH WEEK: Introducing Socket Firewall Enterprise.Learn more →
Socket
Book a DemoInstallSign in
Socket

babel-plugin-minify-numeric-literals

Package Overview
Dependencies
Maintainers
5
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-minify-numeric-literals

Shortens numeric literals using scientific notation

Source
npmnpm
Version
0.5.0-alpha.85c9b6d8
Version published
Weekly downloads
713K
46.5%
Maintainers
5
Weekly downloads
 
Created
Source

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

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

Keywords

babel-minify

FAQs

Package last updated on 15 May 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts