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

Method push

lib/api/readable.js:158–168  ·  view source on GitHub ↗

* @param {Buffer|null} chunk * @returns {boolean}

(chunk)

Source from the content-addressed store, hash-verified

156 * @returns {boolean}
157 */
158 push (chunk) {
159 if (chunk) {
160 this[kBytesRead] += chunk.length
161 if (this[kConsume]) {
162 consumePush(this[kConsume], chunk)
163 return this[kReading] ? super.push(chunk) : true
164 }
165 }
166
167 return super.push(chunk)
168 }
169
170 /**
171 * Consumes and returns the body as a string.

Callers 15

writeMethod · 0.45
finalMethod · 0.45
writeMethod · 0.45
normalizeHeadersFunction · 0.45
setRecordsMethod · 0.45
onResponseStartMethod · 0.45
parseHeadersFunction · 0.45
parseRawHeadersFunction · 0.45
toRawHeadersFunction · 0.45
addListenerFunction · 0.45
parseResponseAddressFunction · 0.45

Calls 1

consumePushFunction · 0.85

Tested by

no test coverage detected