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

Function parsePositiveInt

scripts/hsr/record-runner.mjs:18–24  ·  view source on GitHub ↗
(rawValue, label)

Source from the content-addressed store, hash-verified

16}
17
18export function parsePositiveInt(rawValue, label) {
19 const parsed = Number(rawValue);
20 if (!Number.isInteger(parsed) || parsed < 1) {
21 throw new Error(`${label} must be a positive integer`);
22 }
23 return parsed;
24}
25
26function sanitizeRouterPrefix(value) {
27 const text = String(value);

Callers 2

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected