new number formatter

This commit is contained in:
Ashley 2022-09-22 16:25:31 +02:00
parent c543ae840a
commit 4fa57c1146

View file

@ -93,12 +93,9 @@ function IsJsonString(str) {
} }
function convert(value) { function convert(value) {
if (value >= 1000000) { return new Intl.NumberFormat('en-GB', {
value = value / 1000000 + "M"; notation: "compact"
} else if (value >= 1000) { }).format(value);
value = value / 1000 + "K";
}
return value;
} }
///////////////////////////////// /////////////////////////////////