MCPcopy Index your code
hub / github.com/CodeGraphContext/CodeGraphContext / parsePositiveInt

Function parsePositiveInt

website/api/lib/security.js:10–13  ·  view source on GitHub ↗
(rawValue, fallback)

Source from the content-addressed store, hash-verified

8const DEFAULT_ACTIVE_JOB_TTL_MS = 45 * 60 * 1000;
9
10function parsePositiveInt(rawValue, fallback) {
11 const parsedValue = Number.parseInt(String(rawValue ?? ""), 10);
12 return Number.isFinite(parsedValue) && parsedValue > 0 ? parsedValue : fallback;
13}
14
15function getRateLimitConfig() {
16 return {

Callers 2

getRateLimitConfigFunction · 0.85
getRepoProtectionConfigFunction · 0.85

Calls 1

StringInterface · 0.85

Tested by

no test coverage detected