comma-it
v0.0.7
Published
Node.js module convert numbers to amounts
Downloads
6,013
Readme
Comma-It.js
Tiny module to turn numbers into a more readble amounts by adding commas:
1234.5 => 1,234.50
//require it
var commaIt = require('../comma-it');
commaIt( '12341233,12', {addPrecision:true}); // => '12 341 233,12'
Custom seperators:
commaIt('12341233.12', {addPrecision:true, thousandSeperator : ',', decimalSeperator : '.'}); // => 12,341,233.12'