Necessarily Precedes Mischief

    commafy

    0.0.6 • Public • Published

    commafy

    Add commas to a number.

    Install

    npm install commafy

    Usage

    var commafy = require('commafy')
     
    console.log(commafy(1000000)) // '1,000,000'
    console.log(commafy(1000)) // '1,000'
    console.log(commafy(1000.123)) // '1,000.123'
    console.log(commafy(100)) // '100'
    console.log(commafy(1e4)) // '10,000'

    License

    MIT

    Keywords

    Install

    npm i commafy

    DownloadsWeekly Downloads

    302

    Version

    0.0.6

    License

    MIT

    Unpacked Size

    4.77 kB

    Total Files

    8

    Last publish

    Collaborators

    • miguelmota