MCPcopy Create free account
hub / github.com/afar1/fieldtheory-cli / parsePositiveInteger

Function parsePositiveInteger

src/cli.ts:747–753  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

745}
746
747function parsePositiveInteger(value: string): number {
748 const parsed = Number(value);
749 if (!Number.isInteger(parsed) || parsed < 1) {
750 throw new InvalidArgumentError('value must be a positive integer');
751 }
752 return parsed;
753}
754
755// ── CLI ─────────────────────────────────────────────────────────────────────
756

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected