Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify docs on how to pipe from an async Iterator to a Writable #33644

Closed
mcollina opened this issue May 29, 2020 · 6 comments
Closed

Simplify docs on how to pipe from an async Iterator to a Writable #33644

mcollina opened this issue May 29, 2020 · 6 comments
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. stream Issues and PRs related to the stream subsystem.

Comments

@mcollina
Copy link
Member

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.

@mcollina mcollina added stream Issues and PRs related to the stream subsystem. doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. labels May 29, 2020
@mcollina
Copy link
Member Author

cc @nodejs/streams

@ronag
Copy link
Member

ronag commented May 29, 2020

I agree. That section mostly shows how complicated it can be. Remove it or update to use pipeline?

@mcollina
Copy link
Member Author

I would just update to use pipeline.

@WilliamConnatser
Copy link
Contributor

WilliamConnatser commented Jun 18, 2020

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?

@mcollina
Copy link
Member Author

yes

@rickyes
Copy link
Contributor

rickyes commented Jul 2, 2020

This issues has been solved and can be closed.

@ronag ronag closed this as completed Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. good first issue Issues that are suitable for first-time contributors. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants