MCPcopy
hub / github.com/kefirjs/kefir / callSubscriber

Function callSubscriber

src/dispatcher.js:5–15  ·  view source on GitHub ↗
(type, fn, event)

Source from the content-addressed store, hash-verified

3import {concat, findByPred, remove, contains} from './utils/collections'
4
5function 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
17function Dispatcher() {
18 this._items = []

Callers 3

_onFunction · 0.90
_onFunction · 0.90
dispatchFunction · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…