MCPcopy Create free account
hub / github.com/RtlZeroMemory/Rezi / widgetPathEntry

Function widgetPathEntry

packages/core/src/runtime/commit/validation.ts:16–24  ·  view source on GitHub ↗
(vnode: VNode)

Source from the content-addressed store, hash-verified

14}
15
16export function widgetPathEntry(vnode: VNode): string {
17 const props = vnode.props as { id?: unknown; key?: unknown } | undefined;
18 const id = typeof props?.id === "string" && props.id.length > 0 ? `#${props.id}` : "";
19 const key =
20 typeof props?.key === "string" || typeof props?.key === "number"
21 ? `[key=${String(props.key)}]`
22 : "";
23 return `${vnode.kind}${id}${key}`;
24}
25
26export function formatWidgetPath(depth: number, tailPath: readonly string[]): string {
27 if (tailPath.length === 0) return "(root)";

Callers 1

commitNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected