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

Function envPositiveInt

packages/node/src/frameAudit.ts:49–55  ·  view source on GitHub ↗
(name: string, fallback: number)

Source from the content-addressed store, hash-verified

47}
48
49function envPositiveInt(name: string, fallback: number): number {
50 const value = readEnv(name);
51 if (value === null) return fallback;
52 const parsed = Number(value);
53 if (!Number.isFinite(parsed) || !Number.isInteger(parsed) || parsed <= 0) return fallback;
54 return parsed;
55}
56
57function toHex32(v: number): string {
58 return `0x${(v >>> 0).toString(16).padStart(8, "0")}`;

Callers 1

frameAudit.tsFile · 0.85

Calls 1

readEnvFunction · 0.70

Tested by

no test coverage detected