JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5048
  • Score
    100M100P100Q114319F
  • License MIT

Turn a long number into a short one to improve readability, like 23634 => 23.6K

Package Exports

  • short-number

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (short-number) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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