MCPcopy Create free account
hub / github.com/GetStream/stream-js / off

Method off

src/client.ts:423–429  ·  view source on GitHub ↗

* Remove one or more event handlers * @method off * @memberof StreamClient.prototype * @param {string} [key] - Name of the handler * @example * client.off() removes all handlers * client.off(name) removes the specified handler

(key?: string)

Source from the content-addressed store, hash-verified

421 * client.off(name) removes the specified handler
422 */
423 off(key?: string) {
424 if (key === undefined) {
425 this.handlers = {};
426 } else {
427 delete this.handlers[key];
428 }
429 }
430
431 /**
432 * Call the given handler with the arguments

Callers 3

client_test.jsFile · 0.80
test.tsFile · 0.80
client_test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected