* 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)
| 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 |
no outgoing calls
no test coverage detected