zfm: size string for gigabytes

This commit is contained in:
minjaesong
2025-11-13 09:45:37 +09:00
parent 9247471bf2
commit a45a919c84
3 changed files with 7 additions and 7 deletions

View File

@@ -72,6 +72,7 @@ let cursor = [0, 0] // absolute position!
function bytesToReadable(i) {
return ''+ (
(i > 999999999) ? (((i / 10000000)|0)/100 + "G") :
(i > 999999) ? (((i / 10000)|0)/100 + "M") :
(i > 9999) ? (((i / 100)|0)/10 + "K") :
i