MCPcopy Index your code
hub / github.com/dataease/SQLBot / processNode

Function processNode

frontend/src/router/dynamic.ts:57–80  ·  view source on GitHub ↗
(node: any)

Source from the content-addressed store, hash-verified

55 const pathsSet = new Set(invalid_router_name_list)
56
57 function processNode(node: any): boolean {
58 if (node.name && pathsSet.has(node.name)) {
59 return true
60 }
61 if (node.children) {
62 const newChildren: any[] = []
63
64 for (const child of node.children) {
65 const shouldRemove = processNode(child)
66 if (!shouldRemove) {
67 newChildren.push(child)
68 }
69 }
70
71 if (newChildren.length > 0) {
72 node.children = newChildren
73 return false
74 } else {
75 node.children = undefined
76 }
77 }
78
79 return false
80 }
81
82 let i = 0
83 while (i < tree.length) {

Callers 1

reduceRoutersFunction · 0.85

Calls 2

hasMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected