(pattern: string)
| 196 | * useful message (which field, which value) for the first problem found. |
| 197 | */ |
| 198 | export 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. |
no test coverage detected