short-number

    1.0.7 • Public • Published

    short-number Build Status npm version

    Turn a long number into a short one to improve readability.

    Installation

    $ npm install --save short-number

    Or with bower:

    $ bower install short-number

    Usage

    var shortNumber = require('short-number');
     
    shortNumber(5432);
    //=> 5.4K
     
    shortNumber(1236903);
    //=> 1.2M

    Supports numbers up to 1e18.

    License

    MIT © Jonathan Svärdén

    Install

    npm i short-number

    DownloadsWeekly Downloads

    8,682

    Version

    1.0.7

    License

    MIT

    Unpacked Size

    7.17 kB

    Total Files

    7

    Last publish

    Collaborators

    • cfj