@lou.codes/cron
Version:
⏲️ Cron Quartz and Cron UNIX expression parser
15 lines (14 loc) • 363 B
TypeScript
/**
* Regular expression to match field with an optional `0` to it's left.
*
* @category Regular Expression
* @example
* ```typescript
* paddedRegExp(5); // "0?5"
* ```
* @param value Value to pad.
* @returns RegExp to match value with padded `0`.
*/
export declare const paddedRegExp: <Value extends number | string>(
value: Value,
) => `0?${Value}`;