Reformat-Number ·
re-format javascript string-numbers with ease
This is a simple but opinionated number re-formatter.
- Input: a valid number which might contain commas and a dot for decimal separation.
- Output: same number with commas on right places (between each three digits group).
Instalation
yarn add reformat-number
Usage
const reformat = ; ; // => '1,234,567,890'; // => '1,234,567,890'; // => '-12,345,678.90'; // => '123,456'