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

10 lines 491 B
/** * Formats a duration in milliseconds as a time string. * @param {number} ms - The duration in milliseconds. * @param {string} [format="hh:mm:ss"] - The format string. * @param {boolean} [autoHour=true] - Whether to omit hours if zero. * @returns {string} The formatted duration string. * @throws {TypeError} If ms or format is invalid. */ export default function formatDuration(ms: number, format?: string, autoHour?: boolean): string; //# sourceMappingURL=formatDuration.d.ts.map