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

Function debug

packages/core/src/debug/debug.ts:11–22  ·  view source on GitHub ↗
(node: VNode, options?: { showId?: boolean })

Source from the content-addressed store, hash-verified

9import { ui } from "../widgets/ui.js";
10
11export function debug(node: VNode, options?: { showId?: boolean }): VNode {
12 const id = getNodeId(node);
13 const label = options?.showId !== false && id ? ` ${id} ` : "";
14
15 return ui.box(
16 {
17 border: "single",
18 title: label,
19 },
20 [node],
21 );
22}
23
24export function inspect(value: unknown, options?: { depth?: number }): VNode {
25 const text = formatValue(value, options?.depth ?? 3, 0);

Callers 1

uiDebug.test.tsFile · 0.85

Calls 1

getNodeIdFunction · 0.85

Tested by

no test coverage detected