MCPcopy Create free account
hub / github.com/sshwsfc/xadmin / find_childs

Function find_childs

packages/xadmin/src/rrs.js:122–127  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

120
121 const rs = app.get('routers')
122 const find_childs = (path) => {
123 return (rs[path] || []).map((r) => {
124 const childs = find_childs((path == '@' ? '' : path) + r.path)
125 return childs.length > 0 ? { ...r, childRoutes: [ ...(r.childRoutes||[]), ...childs ] } : r
126 })
127 }
128 const routers = find_childs('@')
129
130 const root = app.get('root_component').reduce((children, render) => {

Callers 1

rrs.jsFile · 0.85

Calls 1

mapMethod · 0.80

Tested by

no test coverage detected