MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / parseCronInt

Function parseCronInt

packages/agent-core/src/tools/cron/cron-expr.ts:121–128  ·  view source on GitHub ↗
(raw: string, name: string, role: string)

Source from the content-addressed store, hash-verified

119const DIGIT_ONLY = /^\d+$/;
120
121function parseCronInt(raw: string, name: string, role: string): number {
122 if (!DIGIT_ONLY.test(raw)) {
123 throw new Error(
124 `cron ${name} ${role} must be a non-negative integer with digits only (got ${JSON.stringify(raw)})`,
125 );
126 }
127 return Number.parseInt(raw, 10);
128}
129
130function addTerm(out: Set<number>, term: string, min: number, max: number, name: string): void {
131 let rangePart = term;

Callers 1

addTermFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected