Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 0.5.0-alpha.41ef96a2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
219K
decreased by-39.14%
Maintainers
5
Weekly downloads
 
Created

What is babel-plugin-minify-numeric-literals?

The babel-plugin-minify-numeric-literals package is a Babel plugin that minifies numeric literals in your JavaScript code. It converts numeric literals to their shortest representation, which can help reduce the size of the code and potentially improve performance.

What are babel-plugin-minify-numeric-literals's main functionalities?

Minify Integer Literals

This feature converts large integer literals into their exponential form to save space. For example, the integer 1000 is converted to 1e3.

const a = 1000; // becomes const a = 1e3;

Minify Floating-Point Literals

This feature converts small floating-point literals into their exponential form. For example, the floating-point number 0.000001 is converted to 1e-6.

const b = 0.000001; // becomes const b = 1e-6;

Minify Hexadecimal Literals

This feature converts hexadecimal literals to their decimal form if it results in a shorter representation. For example, the hexadecimal number 0xFF is converted to 255.

const c = 0xFF; // becomes const c = 255;

Other packages similar to babel-plugin-minify-numeric-literals

Keywords

FAQs

Package last updated on 01 Jun 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

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc