1.0.2 • Published 3 years ago

numabbrev v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

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
1.0.2

3 years ago

1.0.1

3 years ago