MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / parsePositiveInt

Function parsePositiveInt

packages/cli/src/commands/cloudrun.ts:841–848  ·  view source on GitHub ↗
(raw: unknown, flagName: string)

Source from the content-addressed store, hash-verified

839 return Number.isFinite(n) ? n : undefined;
840}
841function parsePositiveInt(raw: unknown, flagName: string): number | undefined {
842 const n = parseIntFlag(raw);
843 if (n === undefined) return undefined;
844 if (!Number.isInteger(n) || n < 1) {
845 throw new Error(`[cloudrun] ${flagName} must be a positive integer; got ${n}`);
846 }
847 return n;
848}
849// fallow-ignore-next-line complexity
850function parseEnum<T extends string>(
851 raw: unknown,

Callers 4

machineVarsFunction · 0.70
runRenderFunction · 0.70
runRenderBatchFunction · 0.70
buildRenderConfigFunction · 0.70

Calls 1

parseIntFlagFunction · 0.70

Tested by

no test coverage detected