Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 7710c0d

Browse files
committed
Clean up
1 parent 50f6ac6 commit 7710c0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export default {
6767
return this.toHex(sum);
6868
},
6969
prettyBytes(bytes: number) {
70-
const units = ["B", "KB", "MB", "GB", "TB", "PB", "EB"];
70+
const units = ["", "K", "M", "G", "T", "P", "E"];
7171
const exp = Math.floor(Math.log(bytes) / Math.log(1024));
72-
return `${Math.round(bytes * 100 / Math.pow(1024, exp)) / 100}${units[exp]}`;
72+
return `${Math.round(bytes * 100 / Math.pow(1024, exp)) / 100}${units[exp]}B`;
7373
},
7474
splitPath(path: string): string[] {
7575
return path

0 commit comments

Comments
 (0)