1.0.2 • Published 3 years ago
numabbrev v1.0.2
Converts a number to its abbreviation.
Installation
npm i numAbrev
Example
import { numAbbrev } from "./converter.js";
numAbbrev(2000) // 2k
numAbbrev(55123) // 55.1k
Input Range: thousands to trillions\ Any number lower/higher than the range will return an error.
numAbbrev(220) // RangeError: Must be within range of 1k to 999tn