UNPKG

convert

Version:

The smallest & fastest library for really easy, totally type-safe unit conversions in TypeScript & JavaScript

16 lines (15 loc) 387 B
import type { Converter } from "../types/converter.js"; import type { Unit } from "../types/units.js"; /** * Convert several values in a string into a single unit. * * @example * ```ts * convertMany('1d 12h').to('hours') === 36; * ``` * * @param value - The string to parse as values * * @public */ export declare function convertMany(value: string): Converter<number, Unit>;