@poppinss/string
Version:
A collection of helpers to perform operations on/related to a string value
15 lines (14 loc) • 506 B
TypeScript
import type { PrettyTime } from './types.ts';
declare const _default: {
/**
* Formats milliseconds to pretty string output
*/
format(milliseconds: number, long?: boolean): PrettyTime;
/**
* Parse the time expression to milliseconds. 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;