Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Add commas to numbers to turn them into amounts
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
test
.gitignore
.travis.yml
LICENSE
comma-it.js
package.json
readme.md

readme.md

Comma-It.js

Build status

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'

@avnerner

Something went wrong with that request. Please try again.