Add numeric separator
Increase the readability of long numbers and uncommon number formats by adding underscore separators.
Why is this refactoring helpful?
Long numbers can be hard to read, especially when they are in binary or hexadecimal formats. Separators break up a long number into more readable segments.
What do I need to consider?
Numeric separators are an ES2021 feature. They are supported on all modern browsers and on Node 12.5+, but for older browsers and Node versions transpilation might be required (compatibility).
- Numeric Separators (MDN)
- ES2021: Numeric Separators (2ality)
- Browser & Node Support (Compatibility Table)
- Code Actions