Skip to content

AbdelrhmanAmin/Number-Abbreivator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Number-Abbreivator

Abbreviate those long bad boys.

I was inspired to build this by this Number-abbreviate-package

The function takes your input and evaulate if it should be abbreviated to a shorter syntax.

input: 1000, output: 1k

input: 50000, output: 50k

input: 50000000000000, output: 50t

input: -10000000, output: -10m

how to use?

1- It is not an NPM package, so feel free to copy the content of index.js into a file.

2- import it import abbreviate from "YOUR_FILE_NAME".

3- use it! abbreviate(5000)

Easter egg

abbreviate(100000000000000000000000000000000000)

output: '⭐⭐INFINITY⭐⭐'

About

Abbreviate those long bad boys.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors