shell tab

This commit is contained in:
Jan Prochazka
2021-03-11 13:40:19 +01:00
parent 7d6bf90a0a
commit 913f89e970
13 changed files with 364 additions and 87 deletions

View File

@@ -0,0 +1,6 @@
export default function formatFileSize(size) {
if (size > 1000000000) return `${Math.round(size / 10000000000) * 10} GB`;
if (size > 1000000) return `${Math.round(size / 10000000) * 10} MB`;
if (size > 1000) return `${Math.round(size / 10000) * 10} KB`;
return `${size} bytes`;
}