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

Function parseNonNegInt

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

Source from the content-addressed store, hash-verified

731// `parseInt || default` would let a nonsensical negative value bypass the
732// fallback.
733function parseNonNegInt(val, defaultVal) {
734 const n = parseInt(val, 10);
735 return Number.isFinite(n) && n >= 0 ? n : defaultVal;
736}
737
738// Case-insensitive header lookup. Octokit normalizes response headers to
739// lowercase, but this defensive check also handles original casing so that

Callers 4

runPostReviewCommentsFunction · 0.85
computeRetryDelayMsFunction · 0.85
withRetryFunction · 0.85
readWithPacingFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected