MCPcopy Create free account
hub / github.com/nodejs/node / pipeline

Function pipeline

deps/undici/src/lib/api/api-pipeline.js:255–263  ·  view source on GitHub ↗
(opts, handler)

Source from the content-addressed store, hash-verified

253}
254
255function pipeline (opts, handler) {
256 try {
257 const pipelineHandler = new PipelineHandler(opts, handler)
258 this.dispatch({ ...opts, body: pipelineHandler.req }, pipelineHandler)
259 return pipelineHandler.ret
260 } catch (err) {
261 return new PassThrough().destroy(err)
262 }
263}
264
265module.exports = pipeline

Callers 4

writeStreamFunction · 0.50
onResponseStartFunction · 0.50
#connectMethod · 0.50

Calls 2

dispatchMethod · 0.65
destroyMethod · 0.45

Tested by

no test coverage detected