This commit is contained in:
Rob Weber 2024-07-29 19:50:37 +00:00
parent e84ac9e38c
commit b476b6808e
4 changed files with 57 additions and 53 deletions

View file

@ -1,6 +1,6 @@
export enum UNIT_BASE {
BASE_2 = 1024,
BASE_10 = 1000
BASE_10 = 1000,
}
export function formatBytes(bytes: number, decimals = 2, base: UNIT_BASE = UNIT_BASE.BASE_2) {