feat(web): prefer higher GiB values (#5340)

This commit is contained in:
Jason Rasmussen 2023-11-27 13:40:29 -05:00 committed by GitHub
parent 0758d55dea
commit ebd64ded62
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -9,7 +9,7 @@
* @returns size (number) and unit (string)
*/
export function getBytesWithUnit(bytes: number, maxPrecision = 1): [number, string] {
const units = ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB'];
const units = ['B', 'KiB', 'MiB', 'GiB'];
let magnitude = 0;
let remainder = bytes;