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

Function pickAllowed

apps/sim/app/api/tools/image/route.ts:455–461  ·  view source on GitHub ↗
(
  value: string | undefined,
  allowed: readonly string[],
  fallback: string
)

Source from the content-addressed store, hash-verified

453}
454
455function pickAllowed(
456 value: string | undefined,
457 allowed: readonly string[],
458 fallback: string
459): string {
460 return value && allowed.includes(value) ? value : fallback
461}
462
463function clampInteger(
464 value: number | undefined,

Callers 3

generateWithOpenAIFunction · 0.85
generateWithGeminiFunction · 0.85
generateWithFalAIFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected