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

Function parsePositiveInt

packages/node/src/worker/engineWorker/shared.ts:149–155  ·  view source on GitHub ↗
(n: unknown)

Source from the content-addressed store, hash-verified

147}
148
149export function parsePositiveInt(n: unknown): number | null {
150 if (typeof n !== "number") return null;
151 if (!Number.isFinite(n)) return null;
152 if (!Number.isInteger(n)) return null;
153 if (n <= 0) return null;
154 return n;
155}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected