CodeZettaInterview Hub

Node.js · Streams · Junior · Comparison

pipe vs pipeline — which should you use?

Short Interview Answer

`stream.pipeline` (or pipelinePromise) handles errors and cleanup; classic `pipe` does not auto-destroy on error.

Detailed Explanation

Always prefer pipeline in new code. Unhandled stream errors are a common crash source. Attach error handlers if you must use pipe.

Did you know this answer?