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

Method getWrappedAndBoundSelectors

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

Source from the content-addressed store, hash-verified

31446 })
31447 }
31448 getWrappedAndBoundSelectors(s, o) {
31449 return objMap(this.getBoundSelectors(s, o), (o, i) => {
31450 let a = [i.slice(0, -9)],
31451 u = this.system.statePlugins[a].wrapSelectors
31452 return u
31453 ? objMap(o, (o, i) => {
31454 let _ = u[i]
31455 return _
31456 ? (Array.isArray(_) || (_ = [_]),
31457 _.reduce((o, i) => {
31458 let wrappedSelector = (...u) => i(o, this.getSystem())(s().getIn(a), ...u)
31459 if (!isFn(wrappedSelector))
31460 throw new TypeError(
31461 'wrapSelector needs to return a function that returns a new function (ie the wrapped action)'
31462 )
31463 return wrappedSelector
31464 }, o || Function.prototype))
31465 : o
31466 })
31467 : o
31468 })
31469 }
31470 getStates(s) {
31471 return Object.keys(this.system.statePlugins).reduce(
31472 (o, i) => ((o[i] = s.get(i)), o),

Callers 1

buildSystemMethod · 0.95

Calls 5

getBoundSelectorsMethod · 0.95
objMapFunction · 0.85
isFnFunction · 0.85
isArrayMethod · 0.45
reduceMethod · 0.45

Tested by

no test coverage detected