(type, fn, event)
| 3 | import {concat, findByPred, remove, contains} from './utils/collections' |
| 4 | |
| 5 | function callSubscriber(type, fn, event) { |
| 6 | if (type === ANY) { |
| 7 | fn(event) |
| 8 | } else if (type === event.type) { |
| 9 | if (type === VALUE || type === ERROR) { |
| 10 | fn(event.value) |
| 11 | } else { |
| 12 | fn() |
| 13 | } |
| 14 | } |
| 15 | } |
| 16 | |
| 17 | function Dispatcher() { |
| 18 | this._items = [] |