0.2.0 • Published 6 years ago
short-num v0.2.0
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.