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).
- Code Assist ID (for the configuration file):
- You can configure custom keyboard shortcuts with this code action kind:
- This code assist provides refactoring suggestions. Learn how to configure the refactoring suggestion visibility.
- Numeric Separators (MDN)
- ES2021: Numeric Separators (2ality)
- Browser & Node Support (Compatibility Table)
- P42 Code Assists