MCPcopy Create free account
hub / github.com/cmliu/CF-Workers-CheckProxyIP / parsePositiveInt

Function parsePositiveInt

_worker.js:5498–5501  ·  view source on GitHub ↗
(value, fallback)

Source from the content-addressed store, hash-verified

5496}));
5497
5498function parsePositiveInt(value, fallback) {
5499 const parsed = Number.parseInt(`${value ?? ''}`, 10);
5500 return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback;
5501}
5502
5503function concatBytes(chunks) {
5504 const merged = new Uint8Array(chunks.reduce((sum, { length }) => sum + length, 0));

Callers 1

handleCheckProxyRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected