PageSourceSearch

https://www.kasite.net/common/js/Observer.js

js kasite.net collected 2026-09-26 04:33:22 UTC 369 bytes, 20 lines download raw bytes

1const subjects = {};
2class Observer {
3  constructor() {
4    this.receiveFncs = {};
5  }
6  receive(s, fnc) {
7    if (!(s in subjects)) subjects[s] = [];
8    subjects[s].push(this);
9    this.receiveFncs[s] = fnc;
10  }
11  emit(s) {
12    if (s in subjects) {
13      for (const data of subjects[s]) {
14        data.receiveFncs[s]();
15      }
16    }
17  }
18}
19
20export { Observer as O };

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.