Add: NumberUtil - numberWithCommas

This commit is contained in:
jisangs committed 2018-05-10 07:37:18 +09:00
1 parent ca4847a397
commit 856e75d2d9
3 files changed
+29

No files matched your search

+7
View File
@@ -0,0 +1,7 @@
class NumberUtil {
static numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
}