Humanize a number 1000000.99 -> 1,000,000.99
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
test Initial commit Sep 30, 2012
.gitignore Initial commit Sep 30, 2012
History.md Release 0.0.2 Nov 19, 2013
Makefile Initial commit Sep 30, 2012
Readme.md add docs Sep 30, 2012
component.json Release 0.0.2 Nov 19, 2013
index.js Initial commit Sep 30, 2012
package.json Release 0.0.2 Nov 19, 2013

Readme.md

humanize-number

Humanize a number 1000000.99 -> 1,000,000.99

Installation

$ component install component/humanize-number

Example

var humanize = require('humanize-number');

humanize(1000);
// => '1,000'

humanize(1000.55, { delimiter: '.', separator: ',' });
// => '1.000,55'

License

MIT