MCPcopy Create free account
hub / github.com/RobPruzan/react-scratch / aux

Function aux

src/utils.ts:79–91  ·  view source on GitHub ↗
(viewNode: T)

Source from the content-addressed store, hash-verified

77 tree: T
78): T => {
79 const aux = (viewNode: T): T | undefined => {
80 for (const node of viewNode.childNodes) {
81 if (eq(node)) {
82 return node;
83 }
84
85 const res = aux(node);
86
87 if (res) {
88 return res;
89 }
90 }
91 };
92
93 if (eq(tree)) {
94 return tree;

Callers 2

findNodeOrThrowFunction · 0.70
findParentNodeOrThrowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected