/** * Format bytes to human-readable string * * @example * ```ts * formatBytes(1024) // '1 KB' * formatBytes(1024, { binary: true }) // '1 KiB' * formatBytes(1234567) // '1.2 MB' * formatBytes(1234567, { precision: 2 }) // '1.23 MB' * ``` */ export declare function formatBytes(bytes: number, options?: BytesOptions): string; /** * Parse human-readable byte string to number * * @example * ```ts * parseBytes('1 KB') // 1000 * parseBytes('1 KiB') // 1024 * parseBytes('1.5 MB') // 1500000 * ``` */ export declare function parseBytes(input: string): number; /** * Compare two byte values */ export declare function compareBytes(a: number | string, b: number | string): number; // Aliases export declare const prettyBytes: unknown; export declare const readableSize: unknown; /** * Format bytes to human-readable string (pretty-bytes replacement) */ export declare interface BytesOptions { precision?: number binary?: boolean space?: boolean locale?: string minimumFractionDigits?: number maximumFractionDigits?: number } export { formatBytes as default };