|
|
@ -134,7 +134,7 @@ module.exports = { |
|
|
|
formatSize(x) { |
|
|
|
formatSize(x) { |
|
|
|
let res = filesize(x, { fixed: 1 }).calculate(); |
|
|
|
let res = filesize(x, { fixed: 1 }).calculate(); |
|
|
|
if (res.result === parseInt(res.result)) res.fixed = res.result.toString(); |
|
|
|
if (res.result === parseInt(res.result)) res.fixed = res.result.toString(); |
|
|
|
if (res.suffix === 'Bytes') res.suffix = 'B'; |
|
|
|
if (res.suffix.startsWith('Byte')) res.suffix = 'B'; |
|
|
|
else res.suffix = res.suffix.replace('iB', ''); |
|
|
|
else res.suffix = res.suffix.replace('iB', ''); |
|
|
|
return res.fixed + ' ' + res.suffix; |
|
|
|
return res.fixed + ' ' + res.suffix; |
|
|
|
}, |
|
|
|
}, |
|
|
|