MCPcopy Index your code
hub / github.com/ByBrawe/opencode-loop / parsePositiveInt

Function parsePositiveInt

src/index.js:138–141  ·  view source on GitHub ↗
(value, fallback = 0)

Source from the content-addressed store, hash-verified

136 }
137}
138
139function parsePositiveInt(value, fallback = 0) {
140 const parsed = Number.parseInt(String(value || ""), 10)
141 return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback
142}
143
144function parseCompactEvery(value) {

Callers 2

parseCompactEveryFunction · 0.85
parseLoopArgsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected