Add: NumberUtil - numberWithCommas

This commit is contained in:
2018-05-10 07:37:18 +09:00
parent ca4847a397
commit 856e75d2d9
3 changed files with 29 additions and 0 deletions
+7
View File
@@ -0,0 +1,7 @@
class NumberUtil {
static numberWithCommas(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
}
}