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

Function lookupField

apps/sim/executor/utils/block-reference.ts:75–89  ·  view source on GitHub ↗
(schema: unknown, fieldName: string)

Source from the content-addressed store, hash-verified

73}
74
75function lookupField(schema: unknown, fieldName: string): unknown | undefined {
76 if (typeof schema !== 'object' || schema === null) return undefined
77 const typed = schema as Record<string, unknown>
78
79 if (fieldName in typed) {
80 return typed[fieldName]
81 }
82
83 const props = getProperties(schema)
84 if (props && fieldName in props) {
85 return props[fieldName]
86 }
87
88 return undefined
89}
90
91function isOpaqueSchemaNode(value: unknown): boolean {
92 const node = asSchemaNode(value)

Callers 1

isPathInSchemaFunction · 0.85

Calls 1

getPropertiesFunction · 0.85

Tested by

no test coverage detected