Socket
Socket
Sign inDemoInstall

babel-plugin-minify-numeric-literals

Package Overview
Dependencies
0
Maintainers
5
Versions
77
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    babel-plugin-minify-numeric-literals

Shortens numeric literals using scientific notation


Version published
Weekly downloads
419K
increased by1.43%
Maintainers
5
Install size
3.06 kB
Created
Weekly downloads
 

Readme

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

FAQs

Last updated on 14 May 2018

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc