UNPKG
my-own-utils
Version:
latest (1.0.5)
1.0.5
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Just a package which help you to not making anything from scratch
my-own-utils
/
thousandSeparator
/
index.ts
6 lines
(4 loc)
•
147 B
text/typescript
View Raw
1
2
3
4
5
6
const
thousandseparator
= (
x:
Number
) => {
return
x.
toString
().
replace
(
/\B(?=(\d{3})+(?!\d))/g
,
"."
); };
export
default
thousandseparator;