MCPcopy Create free account
hub / github.com/Work-Fisher/code-claw / parsePositiveInt

Function parsePositiveInt

compatible-shell/src/cli.mjs:324–327  ·  view source on GitHub ↗
(value, fallback)

Source from the content-addressed store, hash-verified

322}
323
324function parsePositiveInt(value, fallback) {
325 const parsed = Number.parseInt(value || '', 10)
326 return Number.isFinite(parsed) && parsed > 0 ? parsed : fallback
327}
328
329function printHelp() {
330 console.log(`Compatible shell

Callers 1

createStateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected