mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-14 07:24:52 +09:00
Format numbers with , (1,000)
This commit is contained in:
1 parent
6816db0628
commit
a0e98ecb00
1 file changed
+3
@@ -16,6 +16,9 @@ function drawcontents(data) {
|
||||
|
||||
//update existing rows or create new ones
|
||||
data.forEach(function(item, i) {
|
||||
// format count to have .s in it for large number readability (1,000,000)
|
||||
item.count = item.count.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
|
||||
|
||||
let row = rows[i];
|
||||
if(!row) {
|
||||
row = document.createElement('tr');
|
||||
|
||||
Reference in new issue
Block a user