🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more

@babel/plugin-transform-numeric-separator

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-numeric-separator

Remove numeric separators from Decimal, Binary, Hex and Octal literals

7.27.1
latest
Version published
Weekly downloads
20M
12.76%
Maintainers
4
Weekly downloads
 
Created

What is @babel/plugin-transform-numeric-separator?

The @babel/plugin-transform-numeric-separator package allows developers to use numeric separators in their JavaScript code to improve readability of numeric literals. This plugin transforms these numeric literals with separators into standard numeric literals that can be understood by JavaScript engines that do not support this ES2021 feature.

What are @babel/plugin-transform-numeric-separator's main functionalities?

Transforming large numeric literals

Improves readability of large numeric literals by allowing underscores as separators.

1000000000 // Before transformation
1_000_000_000 // After using @babel/plugin-transform-numeric-separator

Support for various numeric types

Allows numeric separators in binary, octal, and hexadecimal literals, enhancing clarity in different numeric systems.

0b1010_0101_1001 // binary
0o2_3_5_7 // octal
0xdead_beef // hexadecimal

Other packages similar to @babel/plugin-transform-numeric-separator

Keywords

FAQs

Package last updated on 30 Apr 2025

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