Skip to main content

@coven/cron@0.3.3
Built and signed on GitHub Actions

⏳ Fantastic cron parser and constructor.

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
2 months ago (0.3.3)
Package root>paddedRegExp.ts
import { join, optional } from "jsr:@coven/expression@^0.3.3"; /** * Regular expression to match field with an optional `0` to it's left. * * @example * ```typescript * paddedRegExp(5); // "0?5" * ``` * @param value Value to pad. * @returns RegExp to match value with padded `0`. */ export const paddedRegExp = <Value extends number | string>( value: Value, ): `0?${Value}` => join(optional(0), value);