(s, o)
| 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), |
no test coverage detected