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.js
7 lines
(6 loc)
•
221 B
JavaScript
View Raw
1
2
3
4
5
6
7
"use strict"
;
Object
.
defineProperty
(
exports
,
"__esModule"
, {
value
:
true
});
const
thousandseparator
= (
x
) => {
return
x.
toString
().
replace
(
/\B(?=(\d{3})+(?!\d))/g
,
"."
); };
exports
.
default
= thousandseparator;