In https://nodejs.org/api/stream.html#stream_piping_to_writable_streams_from_async_iterators we should how to use Events.on and Promise.race() to write to a Writable. However, pipeline already support this and this can be greatly simplified. See https://nodejs.org/api/stream.html#stream_stream_pipeline_source_transforms_destination_callback.
cc @nodejs/streams
I agree. That section mostly shows how complicated it can be. Remove it or update to use pipeline?
I would just update to use pipeline.
I can take a stab at updating the documentation if no one is working on this. May I please just confirm that the only requirement is that the code snippet use pipeline instead of doing it manually... is that correct?
yes
This issues has been solved and can be closed.
Most helpful comment
I can take a stab at updating the documentation if no one is working on this. May I please just confirm that the only requirement is that the code snippet use pipeline instead of doing it manually... is that correct?