inkmbt
v1.0.3
Published
Format numbers in Twitter like formats, thousands in K, millions in M and Trillions in T.
Downloads
11
Maintainers
Readme
inkmbt
Format numbers in Twitter like formats, thousands in K, millions in M and Trillions in T.
Quick start
Installation
npm i inkmbt
Usage
- Use via ES6 import
import inkmbt from "inkmbt"
console.log(inkmbt(1000)) // "1k"
console.log(inkmbt(10000)) // "10k"
console.log(inkmbt(100000)) // "100k"
- Use via CommonJs syntax
let inkmbt = require("inkmbt")
console.log(inkmbt(1000)) // "1k"
console.log(inkmbt(10000)) // "10k"
console.log(inkmbt(100000)) // "100k"
Author
License
MIT LICENSE