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

Function parseNonNegInt

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

Source from the content-addressed store, hash-verified

955// `parseInt || default` would let a nonsensical negative value bypass the
956// fallback.
957function parseNonNegInt(val, defaultVal) {
958 const n = parseInt(val, 10);
959 return Number.isFinite(n) && n >= 0 ? n : defaultVal;
960}
961
962// Case-insensitive header lookup. Octokit normalizes response headers to
963// lowercase, but this defensive check also handles original casing so that

Callers 4

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

Calls

no outgoing calls

Tested by

no test coverage detected