1.1.4 • Published 1 year ago

numberformat_asw v1.1.4

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Number Format

To make the number format as Short form.

for example :

3000         ==> 3K
300000       ==> 300k
3000000      ==> 3M
300000000    ==> 300M
3000000000   ==> 3B
300000000000 ==> 300B

Installation

Install my-project with npm

npm install numberformat_asw

Demo

Use this package as a function

import { numberFormat } from 'numberformat_asw'

const num = 10 // 10
let format = numberFormat(num) // 10

const num = 1000 // 1000
let format = numberFormat(num) // 1k

End

Thank You.