Add: NumberUtil - numberWithCommas
This commit is contained in:
1 parent
ca4847a397
commit
856e75d2d9
3 files changed
+29
No files matched your search
@@ -0,0 +1,7 @@
|
||||
class NumberUtil {
|
||||
|
||||
static numberWithCommas(x) {
|
||||
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user