UNPKG

@the-node-forge/url-shortener

Version:

A URL shortener that generates and stores unique aliases for long URLs, with optional expiration and custom alias support.

15 lines (14 loc) 413 B
/** * Parses a time string (e.g. "1h", "30m", "1h30m", "2h15m10s", "100ms") * into milliseconds. Throws an error if the format is invalid. * * Supported units: * - h: hours * - m: minutes * - s: seconds * - ms: milliseconds * * @param value A string or number representing a duration. * @returns The duration in milliseconds. */ export declare function parseExpiresIn(value: string | number): number;