MCPcopy Index your code
hub / github.com/nodejs/node / off

Method off

deps/undici/src/lib/api/readable.js:133–142  ·  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

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

Callers 15

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

Calls 1

listenerCountMethod · 0.80

Tested by

no test coverage detected