diff --git a/server.js b/server.js index 346df3e0..bcad37e0 100644 --- a/server.js +++ b/server.js @@ -93,12 +93,9 @@ function IsJsonString(str) { } function convert(value) { - if (value >= 1000000) { - value = value / 1000000 + "M"; - } else if (value >= 1000) { - value = value / 1000 + "K"; - } - return value; +return new Intl.NumberFormat('en-GB', { + notation: "compact" +}).format(value); } /////////////////////////////////