/** * 把字节长度用为可读性强的单位表示 * * @param options.iso 是否使用国际标准单位,默认 false,使用 1024 为进制,否则使用 1000 为进制 * @param options.isoUnit 使用国际标准单位时,显示标椎单位 KiB, MiB, GiB, TiB, PiB * @param options.digit 小数位数,默认 2 * @param options.round 四舍五入到指定的小数位数,优先级高于 digit * @param options.short 不固定小数位数,保留有效数字 * @param options.unit 指定单位,只返回指定单位的值 * * @example * readableByte(100) // "100 B" * readableByte(1024) // "1.00 KB" * readableByte(4553) // "4.45 KB" * readableByte(2240000) // "2.14 MB" * readableByte(999888777660) // "931.22 GB" * readableByte(1024, { short: true }) // "1 KB" * readableByte(4553, { digit: 1 }) // "4.4 KB" * readableByte(1024, { iso: true, isoUnit: true }) // "1.02 KiB" */ export declare function readableByte(byteLength: number, options?: { iso?: boolean; isoUnit?: boolean; digit?: number; short?: boolean; round?: number; unit?: "B" | "KB" | "MB" | "GB" | "TB" | "PB" | "KiB" | "MiB" | "GiB" | "TiB" | "PiB"; }): string; //# sourceMappingURL=readableByte.d.ts.map