Using pipe to connect multiple streams
Part of the Stream API, the pipe
function is a precious tool used to wire multiple streams. The function is meant to connect a stream.Readable
source to a stream.Writable
destination.
The pipe example reads a file, parses its content, transforms it and print the result to the standard output.
This example is available with the command node samples/recipe.pipe.js
.