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

Function getRequiredString

apps/sim/tools/trello/shared.ts:18–24  ·  view source on GitHub ↗
(value: unknown, field: string)

Source from the content-addressed store, hash-verified

16export const TRELLO_API_BASE_URL = 'https://api.trello.com/1'
17
18function getRequiredString(value: unknown, field: string): string {
19 if (typeof value === 'string' && value.trim().length > 0) {
20 return value
21 }
22
23 throw new Error(`Trello response is missing required field: ${field}`)
24}
25
26function getOptionalString(value: unknown): string | null {
27 return typeof value === 'string' ? value : null

Callers 5

mapTrelloListFunction · 0.85
mapTrelloCardFunction · 0.85
mapTrelloBoardFunction · 0.85
mapTrelloChecklistFunction · 0.85
mapTrelloActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected