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

Function asOptString

apps/sim/executor/handlers/pi/pi-handler.ts:42–46  ·  view source on GitHub ↗
(value: unknown)

Source from the content-addressed store, hash-verified

40const DEFAULT_MODEL = 'claude-sonnet-5'
41
42function asOptString(value: unknown): string | undefined {
43 if (typeof value !== 'string') return undefined
44 const trimmed = value.trim()
45 return trimmed ? trimmed : undefined
46}
47
48function asRawString(value: unknown): string | undefined {
49 return typeof value === 'string' && value !== '' ? value : undefined

Callers 1

executeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected