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

Method once

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

Source from the content-addressed store, hash-verified

412 e3.push({ cb: F5 }), this.subscribers.set(u3, e3);
413 }
414 once(u3, F5) {
415 const e3 = this.subscribers.get(u3) ?? [];
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));

Callers 15

C5Function · 0.45
WDFunction · 0.45
promptMethod · 0.45
addFunction · 0.45
fetch4Function · 0.45
reqFunction · 0.45
readFunction · 0.45
connectMethod · 0.45
buildConnectorFunction · 0.45
[kConnect]Method · 0.45

Calls 4

__classPrivateFieldGet9Function · 0.85
getMethod · 0.45
pushMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected