MCPcopy
hub / github.com/reduxjs/redux-devtools / getNode

Function getNode

packages/map2tree/src/index.ts:29–43  ·  view source on GitHub ↗
(tree: Node, key: string)

Source from the content-addressed store, hash-verified

27}
28
29function getNode(tree: Node, key: string): Node | null {
30 let node = null;
31
32 visit(
33 tree,
34 (d) => {
35 if (d.name === key) {
36 node = d;
37 }
38 },
39 (d) => d.children
40 );
41
42 return node;
43}
44
45export function map2tree(
46 // eslint-disable-next-line @typescript-eslint/ban-types

Callers 1

map2treeFunction · 0.85

Calls 1

visitFunction · 0.70

Tested by

no test coverage detected