npm i smash-numbers --save
Then...
import { convert, comma } from 'smash-numbers'
console.log(convert(1000)) // 1K
console.log(comma(1000, '.')) // 1.000
console.log(scramble('test')) // estt
console.log(mock('test')) // tEsT
-
convert - CAPITAL | SMALL (Defaults to CAPITAL)
convert(1000, 'SMALL') // 1k
-
comma - (any thing you want) (Defaults to ,)
comma(10000, '.') // 10.000