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

Method getWrappedAndBoundActions

frontend/public/swagger-ui-bundle.js:31427–31447  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

31425 )
31426 }
31427 getWrappedAndBoundActions(s) {
31428 return objMap(this.getBoundActions(s), (s, o) => {
31429 let i = this.system.statePlugins[o.slice(0, -7)].wrapActions
31430 return i
31431 ? objMap(s, (s, o) => {
31432 let a = i[o]
31433 return a
31434 ? (Array.isArray(a) || (a = [a]),
31435 a.reduce((s, o) => {
31436 let newAction = (...i) => o(s, this.getSystem())(...i)
31437 if (!isFn(newAction))
31438 throw new TypeError(
31439 'wrapActions needs to return a function that returns a new function (ie the wrapped action)'
31440 )
31441 return wrapWithTryCatch(newAction, this.getSystem)
31442 }, s || Function.prototype))
31443 : s
31444 })
31445 : s
31446 })
31447 }
31448 getWrappedAndBoundSelectors(s, o) {
31449 return objMap(this.getBoundSelectors(s, o), (o, i) => {
31450 let a = [i.slice(0, -9)],

Callers 2

buildSystemMethod · 0.95
getMapDispatchToPropsMethod · 0.95

Calls 6

getBoundActionsMethod · 0.95
objMapFunction · 0.85
isFnFunction · 0.85
wrapWithTryCatchFunction · 0.85
isArrayMethod · 0.45
reduceMethod · 0.45

Tested by

no test coverage detected