MCPcopy Create free account
hub / github.com/alibaba/open-code-review / parseNonNegInt

Function parseNonNegInt

scripts/github-actions/post-review-comments.js:1911–1914  ·  view source on GitHub ↗
(val, defaultVal)

Source from the content-addressed store, hash-verified

1909// `parseInt || default` would let a nonsensical negative value bypass the
1910// fallback.
1911function parseNonNegInt(val, defaultVal) {
1912 const n = parseInt(val, 10);
1913 return Number.isFinite(n) && n >= 0 ? n : defaultVal;
1914}
1915
1916// Case-insensitive header lookup. Octokit normalizes response headers to
1917// lowercase, but this defensive check also handles original casing so that

Callers 5

publishBatchFunction · 0.85
resolveOutdatedThreadsFunction · 0.85
computeRetryDelayMsFunction · 0.85
withRetryFunction · 0.85
readWithPacingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected