/** * Formats a number with a unit, automatically pluralizing the unit based on the count. * * If the `count` is exactly 1, the singular `unit` is used. * Otherwise, it either uses the provided `plural` form or calls * toPlural(unit) * to generate one. * * @example * ```ts * quantify(1, "apple"); // "1 apple" * ``` * * @example * ```ts * quantify(3, "apple"); // "3 apples" * ``` * * @example * ```ts * quantify("02", "box"); // "02 boxes" * ``` * * @example * ```ts * quantify(1, "child", "children"); // "1 child" * ``` * * @example * ```ts * quantify(2, "child", "children"); // "2 children" * ``` * * @example * ```ts * quantify(5, "CPU"); // "5 CPUs" * ``` * * @param count Number of units, as a number or numeric string. * @param unit Label for the singular unit (e.g., "apple"). * @param plural Optional plural label. If not provided, the unit is pluralized automatically. * @returns A formatted string in the form `x unit(s)`. */ export declare function quantify(count: number | string, unit: string, plural?: string): string;