short-num

0.2.0 • Public • Published

Install

npm install --save short-num

Usage

var shortNum = require('short-num');
 
// shortNum(number, decimalPlaces, abbrev=[ "k", "m", "b", "t" ])
console.log(shortNum(12345, 2)) // => '12.35k'

Code from a StackOverflow question and then modified.

Readme

Keywords

Package Sidebar

Install

npm i short-num

Weekly Downloads

2

Version

0.2.0

License

MIT

Unpacked Size

2.35 kB

Total Files

4

Last publish

Collaborators

  • greenjello