number-grouper
Render numbers as 3-digit separated groups.
example
var grouper = ;var s = ;console;
$ node example/group.js
1,234,567,890
methods
var grouper =
grouper(n, opts={sep:',',radix:'.'})
Convert the number n
into a string with 3-digit groups separated by
opts.sep
.
If there is a decimal component to n
it will be preceeded by opts.radix
.
install
With npm do:
npm install number-grouper
license
MIT