UNPKG

@poppinss/string

Version:

A collection of helpers to perform operations on/related to a string value

15 lines (14 loc) 491 B
import type { PrettyTime } from './types.ts'; declare const _default: { /** * Formats seconds to pretty string output */ format(seconds: number, long?: boolean): PrettyTime; /** * Parse the time expression to seconds. If the unit value is a number, then * it will be returned as it is. Otherwise the string expression will be * converted to a number representing seconds. */ parse(duration: string | number): number; }; export default _default;