UNPKG

abbreviate-number

Version:

Abbreviate a number and include a suffix such as k and m.

3 lines (2 loc) 230 B
Abbreviate a number so that it has a *k* or *m* suffix. Totally inspired by this [post](http://stackoverflow.com/questions/25611937/abbreviate-a-localized-number-in-javascript-for-thousands-1k-and-millions-1m/25612036#25612036).