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

Function parseNonNegInt

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

Source from the content-addressed store, hash-verified

1180// `parseInt || default` would let a nonsensical negative value bypass the
1181// fallback.
1182function parseNonNegInt(val, defaultVal) {
1183 const n = parseInt(val, 10);
1184 return Number.isFinite(n) && n >= 0 ? n : defaultVal;
1185}
1186
1187// Case-insensitive header lookup. Octokit normalizes response headers to
1188// 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