Neatly Punctuated Musings
    Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    number-grouperpublic

    number-grouper

    Render numbers as 3-digit separated groups.

    build status

    example

    var grouper = require('number-grouper');
    var s = grouper(1234567890);
    console.log(s);

    $ node example/group.js
    1,234,567,890

    methods

    var grouper = require('number-grouper')

    grouper(n, opts={sep:',',radix:'.'})

    Convert the number n into a string with 3-digit groups separated by opts.sep.

    If there is a decimal component to n it will be preceeded by opts.radix.

    install

    With npm do:

    npm install number-grouper

    license

    MIT

    Keywords

    none

    install

    npm i number-grouper

    Downloadslast 7 days

    22

    version

    0.0.1

    license

    none

    repository

    github.com

    last publish

    collaborators

    • avatar