Skip to content

Commit

Permalink
fix(view): change base 1024 size measurements to unambigous labels
Browse files Browse the repository at this point in the history
for #119
  • Loading branch information
MauriceNino committed Jun 16, 2022
1 parent ac01eb3 commit 148f8db
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/view/src/utils/calculations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export const bpsPrettyPrint = (bits: number) => {

export const bytePrettyPrint = (byte: number): string => {
return byte > 1024 * 1024 * 1024
? `${(byte / 1024 / 1024 / 1024).toFixed(1)} GB`
? `${(byte / 1024 / 1024 / 1024).toFixed(1)} GiB`
: byte > 1024 * 1024
? `${(byte / 1024 / 1024).toFixed(1)} MB`
? `${(byte / 1024 / 1024).toFixed(1)} MiB`
: byte > 1024
? `${(byte / 1024).toFixed(1)} KB`
? `${(byte / 1024).toFixed(1)} KiB`
: `${byte.toFixed(1)} B`;
};

Expand Down

0 comments on commit 148f8db

Please sign in to comment.