Update import/exports to be more tree-shake friendly

This commit is contained in:
2026-02-14 21:12:16 -05:00
parent 61cceb41ba
commit da0db483aa
29 changed files with 260 additions and 357 deletions

View File

@@ -5,5 +5,5 @@ export function humanReadableBytes(bytes: number, decimals: number = 2): string{
const sizes = [ "Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" ];
const power = Math.floor(Math.log(bytes) / Math.log(1024));
return `${parseFloat((bytes / Math.pow(1024, power)).toFixed(decimals))} ${sizes[power]}`;
return `${Number.parseFloat((bytes / Math.pow(1024, power)).toFixed(decimals))} ${sizes[power]}`;
}