UNPKG

itty-time

Version:

Ultra-small (~390 bytes) library for TTL date math and converting ms durations to and from strings.

9 lines (8 loc) 308 B
type DurationOptions = { parts?: number; join?: string | false; }; type UnformattedDurationSegment = [unit: string, value: number]; type DurationType = (milliseconds: number, options?: DurationOptions) => string | UnformattedDurationSegment[]; export declare const duration: DurationType; export {};