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

Function parseNonNegativeInt

apps/vis/server/src/routes/tasks.ts:86–90  ·  view source on GitHub ↗
(raw: string | undefined, fallback: number)

Source from the content-addressed store, hash-verified

84}
85
86function parseNonNegativeInt(raw: string | undefined, fallback: number): number {
87 if (raw === undefined) return fallback;
88 const n = Number.parseInt(raw, 10);
89 return Number.isFinite(n) && n >= 0 ? n : fallback;
90}

Callers 1

tasksRouteFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected