MCPcopy Index your code
hub / github.com/thesysdev/openui / containsDynamicValue

Function containsDynamicValue

packages/lang-core/src/parser/materialize.ts:14–23  ·  view source on GitHub ↗
(v: unknown)

Source from the content-addressed store, hash-verified

12 * evaluation. Walks into arrays, ElementNode children, and plain objects.
13 */
14export function containsDynamicValue(v: unknown): boolean {
15 if (v == null || typeof v !== "object") return false;
16 if (isASTNode(v)) return true;
17 if (Array.isArray(v)) return v.some(containsDynamicValue);
18 if (isElementNode(v)) {
19 return Object.values(v.props).some(containsDynamicValue);
20 }
21 const obj = v as Record<string, unknown>;
22 return Object.values(obj).some(containsDynamicValue);
23}
24
25export interface MaterializeCtx {
26 syms: Map<string, ASTNode>;

Callers 1

materializeValueFunction · 0.85

Calls 2

isASTNodeFunction · 0.90
isElementNodeFunction · 0.90

Tested by

no test coverage detected