MCPcopy Index your code
hub / github.com/simstudioai/sim / parsePositiveInt

Function parsePositiveInt

apps/sim/connectors/google-forms/google-forms.ts:162–166  ·  view source on GitHub ↗

* Parses an optional positive-integer config value, returning 0 when unset/invalid.

(value: unknown)

Source from the content-addressed store, hash-verified

160 * Parses an optional positive-integer config value, returning 0 when unset/invalid.
161 */
162function parsePositiveInt(value: unknown): number {
163 if (value == null || value === '') return 0
164 const num = Number(value)
165 return Number.isNaN(num) || num <= 0 ? 0 : Math.floor(num)
166}
167
168/**
169 * Maps a small array over an async worker with a bounded concurrency, preserving

Callers 2

resolveResponseCapFunction · 0.85
google-forms.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected