MCPcopy
hub / github.com/di-sukharev/opencommit / emit

Method emit

out/cli.cjs:418–422  ·  view source on GitHub ↗
(u3, ...F5)

Source from the content-addressed store, hash-verified

416 e3.push({ cb: F5, once: true }), this.subscribers.set(u3, e3);
417 }
418 emit(u3, ...F5) {
419 const e3 = this.subscribers.get(u3) ?? [], s2 = [];
420 for (const C5 of e3) C5.cb(...F5), C5.once && s2.push(() => e3.splice(e3.indexOf(C5), 1));
421 for (const C5 of s2) C5();
422 }
423 unsubscribe() {
424 this.subscribers.clear();
425 }

Callers 15

promptMethod · 0.45
onKeypressMethod · 0.45
closeMethod · 0.45
constructorMethod · 0.45
abortFunction · 0.45
fetch4Function · 0.45
destroyStreamFunction · 0.45
onErrorFunction · 0.45

Calls 3

C5Function · 0.85
getMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected