MCPcopy Index your code
hub / github.com/forloopcodes/contextplus / toIntegerOr

Function toIntegerOr

src/core/process-lifecycle.ts:40–44  ·  view source on GitHub ↗
(value: string | undefined, fallback: number)

Source from the content-addressed store, hash-verified

38}
39
40function toIntegerOr(value: string | undefined, fallback: number): number {
41 if (!value) return fallback;
42 const parsed = Number.parseInt(value, 10);
43 return Number.isFinite(parsed) ? parsed : fallback;
44}
45
46function unrefHandle(handle: { unref?: () => void } | null): void {
47 handle?.unref?.();

Callers 2

getIdleShutdownMsFunction · 0.70
getParentPollMsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected