Fishrock123 / bob

🚰 binary data "streams+" via data producers, data consumers, and pull flow.
MIT License
79 stars 8 forks source link

Make Stream() an async iterator #36

Open Fishrock123 opened 5 years ago

Fishrock123 commented 5 years ago

I think Stream() would be a good place for this, what does everyone else think?

We should also be sure to handle cases such as https://github.com/nodejs/node/issues/28194

Raynos commented 5 years ago

Stream is a utility for connecting multiple bob streams together. It seems to be used like pipeline()

For async iterator use case we can just export a function or class to make the iterator.

Doing this in stream() means you cannot really create an iterator for a single source or duplex cleanly