MCPcopy
hub / github.com/node-cron/node-cron / parse

Function parse

src/pattern/validation/pattern-validation.ts:198–202  ·  view source on GitHub ↗
(pattern: string)

Source from the content-addressed store, hash-verified

196 * useful message (which field, which value) for the first problem found.
197 */
198export function parse(pattern: string): ParsedFields {
199 const result = validateDetailed(pattern);
200 if (!result.valid) throw new Error(result.errors[0].message);
201 return result.fields as ParsedFields;
202}
203
204/**
205 * Validates a Cron-Job expression pattern.

Callers 1

Calls 1

validateDetailedFunction · 0.85

Tested by

no test coverage detected