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

Method on

lib/api/readable.js:112–118  ·  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

110 * @returns {this}
111 */
112 on (event, listener) {
113 if (event === 'data' || event === 'readable') {
114 this[kReading] = true
115 this[kUsed] = true
116 }
117 return super.on(event, listener)
118 }
119
120 /**
121 * @param {string|symbol} event

Callers 15

addListenerMethod · 0.95
dumpMethod · 0.95
constructorMethod · 0.45
constructorMethod · 0.45
connectH1Function · 0.45
destroyFunction · 0.45
writeStreamFunction · 0.45
writeIterableFunction · 0.45
[kAddClient]Method · 0.45
connectFunction · 0.45
addUpstreamMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected