MCPcopy Create free account
hub / github.com/dataease/SQLBot / getParent

Method getParent

frontend/public/swagger-ui-bundle.js:41144–41154  ·  view source on GitHub ↗
(s, o)

Source from the content-addressed store, hash-verified

41142 for (let u = 0; u < s.length && ((i = s[u]), (o = a.children), o[i]); u += 1) a = o[i]
41143 return a && a.protoValue
41144 }
41145 getParent(s, o) {
41146 return !s || s.length < 1
41147 ? null
41148 : s.length < 2
41149 ? this.root
41150 : s.slice(0, -1).reduce((s, i) => {
41151 if (!s) return s
41152 const { children: a } = s
41153 return (!a[i] && o && (a[i] = context_tree_createNode(null, s)), a[i])
41154 }, this.root)
41155 }
41156 }
41157 function context_tree_createNode(s, o) {

Callers 15

setMethod · 0.95
lfFunction · 0.80
vfFunction · 0.80
LfFunction · 0.80
IfFunction · 0.80
jfFunction · 0.80
cFunction · 0.80
mgFunction · 0.80
BgFunction · 0.80
PgFunction · 0.80
ebFunction · 0.80
bbFunction · 0.80

Calls 2

context_tree_createNodeFunction · 0.85
reduceMethod · 0.45

Tested by

no test coverage detected