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

Function systemExtend

frontend/public/swagger-ui-bundle.js:31563–31608  ·  view source on GitHub ↗
(s = {}, o = {})

Source from the content-addressed store, hash-verified

31561 )
31562 }
31563 function systemExtend(s = {}, o = {}) {
31564 if (!isObject(s)) return {}
31565 if (!isObject(o)) return s
31566 o.wrapComponents &&
31567 (objMap(o.wrapComponents, (i, a) => {
31568 const u = s.components && s.components[a]
31569 u && Array.isArray(u)
31570 ? ((s.components[a] = u.concat([i])), delete o.wrapComponents[a])
31571 : u && ((s.components[a] = [u, i]), delete o.wrapComponents[a])
31572 }),
31573 Object.keys(o.wrapComponents).length || delete o.wrapComponents)
31574 const { statePlugins: i } = s
31575 if (isObject(i))
31576 for (let s in i) {
31577 const a = i[s]
31578 if (!isObject(a)) continue
31579 const { wrapActions: u, wrapSelectors: _ } = a
31580 if (isObject(u))
31581 for (let i in u) {
31582 let a = u[i]
31583 ;(Array.isArray(a) || ((a = [a]), (u[i] = a)),
31584 o &&
31585 o.statePlugins &&
31586 o.statePlugins[s] &&
31587 o.statePlugins[s].wrapActions &&
31588 o.statePlugins[s].wrapActions[i] &&
31589 (o.statePlugins[s].wrapActions[i] = u[i].concat(
31590 o.statePlugins[s].wrapActions[i]
31591 )))
31592 }
31593 if (isObject(_))
31594 for (let i in _) {
31595 let a = _[i]
31596 ;(Array.isArray(a) || ((a = [a]), (_[i] = a)),
31597 o &&
31598 o.statePlugins &&
31599 o.statePlugins[s] &&
31600 o.statePlugins[s].wrapSelectors &&
31601 o.statePlugins[s].wrapSelectors[i] &&
31602 (o.statePlugins[s].wrapSelectors[i] = _[i].concat(
31603 o.statePlugins[s].wrapSelectors[i]
31604 )))
31605 }
31606 }
31607 return Ye()(s, o)
31608 }
31609 function wrapWithTryCatch(s, o, { logErrors: i = !0 } = {}) {
31610 return 'function' != typeof s
31611 ? s

Callers 1

registerMethod · 0.85

Calls 6

isObjectFunction · 0.85
objMapFunction · 0.85
concatMethod · 0.80
YeFunction · 0.50
isArrayMethod · 0.45
keysMethod · 0.45

Tested by

no test coverage detected