Wiki : Cash Suffixes
Thai Sub : README.th.md
Function cashSuffixes TypeScript cashSuffixes.ts
Function cashSuffixes JavaScript cashSuffixes.js
- if
cashSuffixes(0)
will get results0
- if
cashSuffixes(10)
will get results16
- if
cashSuffixes(100)
will get results195
- if
cashSuffixes(1200)
will get results1.2k
- if
cashSuffixes(55000)
will get results55k
- if
cashSuffixes(956243)
will get results956.24k
- if
cashSuffixes(1060715)
will get results1.06M
- if
cashSuffixes(5054098846)
will get results5.05B
Example :
-
console.log(cashSuffixes(50000000000)) //Output: 50B
-
console.log(cashSuffixes(50060000000)) //Output: 50.06B
-
console.log(cashSuffixes(50500013502)) //Output: 50.50B
-
console.log(cashSuffixes(50500013502, 5)) //Output: 50.50001B
-
console.log(cashSuffixes(50500013502, 5)) //Output: 50.50001B
-
console.log(cashSuffixes(50568200000, 20)) //Output: 50.5682B
-
console.log(cashSuffixes(50568200001, 20)) //Output: 50.568200001B
-
console.log(cashSuffixes(505682000154654998400, 20)) //Output: 505.682000154655undefined
Add a cash suffix that variable types
can be as many as you want.
Example :
const types = ['', 'k', 'M', 'B', 'T', 'qd', 'Qn', 'sx', 'Sp', 'O', 'N'];
-
👨💻 Developer :
wuw.sh (pain)
-
Xbox :
wuwShPain
-
Github :
wuw-sh
-
YouTube :
wuw-sh
-
Facebook :
Wuw Sh Pain
-
Omlet Arcade :
wuw.sh