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

Method off

out/cli.cjs:70317–70325  ·  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

70315 }
70316 /**
70317 * Removes the specified listener from the listener array for the event.
70318 * off() will remove, at most, one instance of a listener from the listener array. If any single
70319 * listener has been added multiple times to the listener array for the specified event, then
70320 * off() must be called multiple times to remove each instance.
70321 * @returns this MessageStream, so that calls can be chained
70322 */
70323 off(event, listener) {
70324 const listeners = __classPrivateFieldGet7(this, _MessageStream_listeners, "f")[event];
70325 if (!listeners)
70326 return this;
70327 const index = listeners.findIndex((l3) => l3.listener === listener);
70328 if (index >= 0)

Callers

nothing calls this directly

Calls 1

__classPrivateFieldGet7Function · 0.85

Tested by

no test coverage detected