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

Method off

out/cli.cjs:81610–81618  ·  view source on GitHub ↗

* Removes the specified listener from the listener array for the event. * off() will remove, at most, one instance of a listener from the listener array. If any single * listener has been added multiple times to the listener array for the specified event, then * off() must be called multipl

(event, listener)

Source from the content-addressed store, hash-verified

81608 }
81609 /**
81610 * Removes the specified listener from the listener array for the event.
81611 * off() will remove, at most, one instance of a listener from the listener array. If any single
81612 * listener has been added multiple times to the listener array for the specified event, then
81613 * off() must be called multiple times to remove each instance.
81614 * @returns this ChatCompletionStream, so that calls can be chained
81615 */
81616 off(event, listener) {
81617 const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event];
81618 if (!listeners)
81619 return this;
81620 const index = listeners.findIndex((l3) => l3.listener === listener);
81621 if (index >= 0)

Callers 8

WDFunction · 0.45
promptMethod · 0.45
onFinallyMethod · 0.45
onFinishedFunction · 0.45
writeIterableFunction · 0.45
offMethod · 0.45
onCompleteFunction · 0.45
onErrorFunction · 0.45

Calls 1

__classPrivateFieldGet9Function · 0.85

Tested by

no test coverage detected