style-abbreviated-number
v1.0.0
Published
Transform big number to shorter one and add suffix on it.
Downloads
9
Maintainers
Readme
Style abbreviated number
Transform big number to shorter one and add suffix on it.
Installation
npm install style-abbreviated-number
Usage
import styleNumb from 'style-abbreviated-number';
var parsed = styleNumb(100000, 0, 10000);
// Output should be `100k`
Tests
npm test