-
Notifications
You must be signed in to change notification settings - Fork 7
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
Add toArray method #37
Comments
Great, absolutely! (Might take an optional object with limit parameter for infinite iterators?) |
@rubensworks - agreed this would be very useful; so long as you are just using consuming the data using the P.S. sorry for the delay - I'll push what I have today; editing some of the tests have been a bit time consuming. Once I've done that (which includes a solution to #38 ) it may be worth having a custom |
Not sure. I had in mind that this method would arrayify elements that have not been consumed yet. E.g., if the user has already called |
While conserving the stream should be encouraged, there are still many use cases where converting the stream to an array is needed.
This is often done using arrayify-stream now, but this introduced the overhead of installing an additional package.
For developers, it would simplify things a lot if there was an (async)
toArray
method available, which would fully consume the stream and produce an array.@RubenVerborgh If this sounds good to you, I will look into implementing this for including in the next major release (for #36).
The text was updated successfully, but these errors were encountered: