MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / parsePositiveInt

Function parsePositiveInt

packages/node/src/backend/backendSharedConfig.ts:185–191  ·  view source on GitHub ↗
(n: unknown)

Source from the content-addressed store, hash-verified

183}
184
185export function parsePositiveInt(n: unknown): number | null {
186 if (typeof n !== "number") return null;
187 if (!Number.isFinite(n)) return null;
188 if (!Number.isInteger(n)) return null;
189 if (n <= 0) return null;
190 return n;
191}
192
193export function parseBoundedPositiveIntOrThrow(
194 name: string,

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected