‚̧Negatively Proportional Model
    Have ideas to improve npm?Join in the discussion! ¬Ľ

    commatic

    1.0.2¬†‚Äʬ†Public¬†‚Äʬ†Published

    Commatic

    Commatic is a lightweight comma delimiter for formatting numbers into standard form periods. Everyone needs one of these.


    API

    commatic(number)

    var commatic = require('commatic');
     

     


    -- Example 1 --

    console.log(commatic(10000000));

    Output will be:

    10,000,000
    

       


    -- Example 2 --

    console.log(commatic(43624595635));

    Output will be:

    43,624,595,635
    

       


    -- Example 3 --

    console.log(commatic(-165778065));

    Output will be:

    -165,778,065
    

       


    -- Example 4 --

    console.log(commatic(8732418.5682));

    Output will be:

    8,732,418.5682
    

       


    -- Example 5 --

    console.log(commatic(87));

    Output will be:

    87
    

     

    Notes

    Commatic is a lightweight comma delimiter for formatting numbers into standard form periods. Everyone needs one of these.

    Installation

    With npm do

    $ npm install commatic

    License

    (MIT)

    Copyright (c) 2019 David H. <email6@gmail.com>

    Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

    The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

    Install

    npm i commatic

    DownloadsWeekly Downloads

    2

    Version

    1.0.2

    License

    MIT

    Unpacked Size

    5.28 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar