MCPcopy
hub / github.com/nodejs/undici / off

Method off

lib/api/readable.js:134–143  ·  view source on GitHub ↗

* @param {string|symbol} event * @param {(...args: any[]) => void} listener * @returns {this}

(event, listener)

Source from the content-addressed store, hash-verified

132 * @returns {this}
133 */
134 off (event, listener) {
135 const ret = super.off(event, listener)
136 if (event === 'data' || event === 'readable') {
137 this[kReading] = (
138 this.listenerCount('data') > 0 ||
139 this.listenerCount('readable') > 0
140 )
141 }
142 return ret
143 }
144
145 /**
146 * @param {string|symbol} event

Callers 15

removeListenerMethod · 0.95
onFinishedFunction · 0.80
writeIterableFunction · 0.80
onUpgradeStreamCloseFunction · 0.80
onRequestStreamCloseFunction · 0.80
onResponseFunction · 0.80
onEndFunction · 0.80
onErrorFunction · 0.80
onFrameErrorFunction · 0.80
onAbortedFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected