improve file previews

This commit is contained in:
2020-06-14 16:02:15 +02:00
parent 881796b416
commit 4f0393a674
3 changed files with 32 additions and 10 deletions

View File

@@ -67,6 +67,10 @@ function formatNumber(amt, precision) {
return amt
}
function formatThousands(x) {
return x.toString().replace(/\B(?=(\d{3})+(?!\d))/g, " ");
}
function formatDataVolume(amt, precision) {
if (precision < 3) { precision = 3; }
if (amt >= 1e12) {