anyamount - tiny Intl number formatter for any locale

anyamount
anyamount(, {mode:,locale:})

compact for big numbers, plain for small

output

what your users see

result