humanize-number

Humanize a number (1000000 -> 1,000,000)

2 个版本
安装
npm install humanize-number
yarn add humanize-number
pnpm add humanize-number
bun add humanize-number
README

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

版本列表
0.0.2 2013-12-04
0.0.1 2012-11-06