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

Function resolveConstStringValue

scripts/generate-docs.ts:3278–3281  ·  view source on GitHub ↗

* Try to resolve a SCREAMING_SNAKE_CASE constant to its string value by * searching in the given content AND the webhook provider constants cache.

(constName: string, content: string)

Source from the content-addressed store, hash-verified

3276 * searching in the given content AND the webhook provider constants cache.
3277 */
3278function resolveConstStringValue(constName: string, content: string): string | null {
3279 const pattern = new RegExp(`\\b${constName}\\s*=\\s*['"]([^'"]+)['"]`)
3280 return pattern.exec(content)?.[1] ?? pattern.exec(getWebhookProviderConstants())?.[1] ?? null
3281}
3282
3283/**
3284 * Parse a single SubBlockConfig object literal into a TriggerConfigField.

Callers 1

parseSubBlockObjectFunction · 0.85

Calls 1

Tested by

no test coverage detected