MCPcopy Create free account
hub / github.com/ding113/claude-code-hub / parsePositiveInt

Function parsePositiveInt

tests/vitest.base.ts:33–37  ·  view source on GitHub ↗
(value: string | undefined, fallback: number)

Source from the content-addressed store, hash-verified

31};
32
33export function parsePositiveInt(value: string | undefined, fallback: number): number {
34 if (!value) return fallback;
35 const parsed = Number.parseInt(value.trim(), 10);
36 return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
37}
38
39export function parseWorkerLimit(
40 value: string | undefined,

Callers 2

vitest.config.tsFile · 0.90
createTestRunnerConfigFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected