UNPKG

@utilify/core

Version:

Modern, strongly typed, and safe utility function library for JavaScript and TypeScript. Includes type checking, manipulation of arrays, objects, strings, dates, colors, numbers, regular expressions, and more. Compatible with Browser, Node.js, Deno, and B

12 lines 535 B
type TimeUnit = "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "years"; /** * Converts a time value from one unit to another. * @param {number} time - The time value. * @param {TimeUnit} from - The unit to convert from. * @param {TimeUnit} to - The unit to convert to. * @returns {number} The converted time value. * @throws {TypeError} If arguments are invalid. */ export default function convertTimeUnit(time: number, from: TimeUnit, to: TimeUnit): number; export {}; //# sourceMappingURL=convertTimeUnit.d.ts.map