/** * Format a bitrate value into a human-readable form as bps, kbps, or Mbps. * * @param value - The bitrate value to convert, in bits per second. * * @returns Returns the value as a human-readable string. * * @example * * ```ts * formatBps(500); // "500 bps". * formatBps(2000); // "2 kbps". * formatBps(15000); // "15 kbps". * formatBps(2560); // "2.6 kbps". * formatBps(1000000); // "1 Mbps". * formatBps(2560000); // "2.6 Mbps". * ``` * * @category Utilities */ export declare function formatBps(value: number): string; /** * Format a byte count into a human-readable form as bytes, KB, MB, GB, or TB. Uses 1024-based thresholds matching the convention every operating system uses for * displaying file and buffer sizes. * * @param value - The byte count to convert. * * @returns Returns the value as a human-readable string. * * @example * * ```ts * formatBytes(512); // "512 bytes". * formatBytes(2048); // "2 KB". * formatBytes(1536); // "1.5 KB". * formatBytes(1_048_576); // "1 MB". * formatBytes(2_621_440); // "2.5 MB". * formatBytes(1_073_741_824); // "1 GB". * formatBytes(1_099_511_627_776); // "1 TB". * ``` * * @category Utilities */ export declare function formatBytes(value: number): string; /** * Format a millisecond duration into a human-readable form as ms, s, min, or hr. Tiered thresholds match how operators naturally read elapsed time: sub-second * values stay in milliseconds for precision, longer durations promote to seconds, minutes, and hours. * * @param value - The duration to convert, in milliseconds. * * @returns Returns the value as a human-readable string. * * @example * * ```ts * formatMs(250); // "250 ms". * formatMs(1500); // "1.5 s". * formatMs(15000); // "15 s". * formatMs(90000); // "1.5 min". * formatMs(5_400_000); // "1.5 hr". * ``` * * @category Utilities */ export declare function formatMs(value: number): string; /** * Format a numeric percentage value into a human-readable form with a trailing percent sign. Applies the same precision policy as the magnitude-based formatters * via the shared internal helper: whole numbers render without a trailing decimal, fractional numbers render to one decimal place. * * @param value - The percentage value to convert. Treated as already-scaled into percent units (50 means 50%, not 0.5). * * @returns Returns the value as a human-readable string ending in `%`. * * @example * * ```ts * formatPercent(0); // "0%". * formatPercent(50); // "50%". * formatPercent(100); // "100%". * formatPercent(33.333); // "33.3%". * ``` * * @category Utilities */ export declare function formatPercent(value: number): string; /** * Format a second-resolution duration into a human-readable form as s, min, or hr. Same tier semantics as {@link formatMs}, scaled for inputs that arrive already * in seconds rather than milliseconds. * * @param value - The duration to convert, in seconds. * * @returns Returns the value as a human-readable string. * * @example * * ```ts * formatSeconds(45); // "45 s". * formatSeconds(90); // "1.5 min". * formatSeconds(1800); // "30 min". * formatSeconds(5400); // "1.5 hr". * ``` * * @category Utilities */ export declare function formatSeconds(value: number): string; //# sourceMappingURL=formatters.d.ts.map