/** * A byte count written the way a person would say it: `800 B`, `2.6 KB`, * `123 KB`, `20.5 GB`. * * ── Why this exists ───────────────────────────────────────────────────────── * * Every one of the 294 shipped packs is smaller than a quarter of a megabyte — * the largest is 248 KB and 120 are under 10 KB. Printed in megabytes to one * decimal, as `pack list` did, the whole catalogue collapsed into three * strings: `0.0 MB` for 194 packs, `0.1 MB` for 53, `0.2 MB` for the last 47. * * A size that cannot tell two packs apart is not a size, it is a decoration; * and `0.0` actively misinforms, because it reads as "nothing" when the honest * answer is "three kilobytes". * * The rules are the ones people already read without noticing: * * - below a kilobyte, whole bytes — `800 B`, never `0.8 KB` * - below a hundred of a unit, one decimal — `2.6 KB` distinguishes packs * that `3 KB` does not * - at a hundred and above, whole numbers — `123 KB`, because a tenth of a * kilobyte there is noise * * ── Why the arithmetic looks like this ────────────────────────────────────── * * All five implementations must produce the same string for the same number: * a shared CLI fixture compares their output byte for byte, so a size that * differs in the last digit is a five-way parity failure. Hence integers * throughout — no float division, no `toFixed`, and no reliance on how a * language happens to round a half. */ export declare function humanBytes(bytes: number): string; //# sourceMappingURL=human-bytes.d.ts.map