Nodeschool Public Materials
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

add-commas

0.0.4 • Public • Published

add-commas

Add commas to a number

Credit

Core logic adapted from this thread on Stack Overflow

Usage

var addCommas = require('add-commas');

// yes
addCommas(12345);   // 12,345
addCommas('12345'); // 12,345

// no
addCommas();        // throws Error
addCommas(123.45)   // throws Error
addCommas('dogs')   // throws Error

License

Go nuts.

install

npm i add-commas

Downloadsweekly downloads

325

version

0.0.4

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar