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

Operating on async-iterables #850

Open
jbriales opened this issue Dec 4, 2022 · 1 comment
Open

Operating on async-iterables #850

jbriales opened this issue Dec 4, 2022 · 1 comment

Comments

@jbriales
Copy link

jbriales commented Dec 4, 2022

It seems the helpers in this package do not work when run on async-iterables.
E.g. the following will complain about missing iterable[Symbol.iterator]?

Uncaught TypeError: iterable[Symbol.iterator] is not a function

Is the lack for support for async-iterables a known issue?
Maybe the documentation should state this?

Also, is this just a matter of extending the logic
to deal with the specifics of the async-iterables vs normal iterables?
Or is there a deeper constraint/issue here preventing support for those?

@github-actions github-actions bot added the Stale label Feb 3, 2023
Repository owner deleted a comment from github-actions bot Feb 6, 2023
@nvie nvie removed the Stale label Feb 6, 2023
@nvie
Copy link
Owner

nvie commented Feb 6, 2023

Is the lack for support for async-iterables a known issue?

Yes, it's a known thing, unfortunately. In JavaScript, a sync and async iterator are different beasts, and you need to write a different version of the async one. (Much like you cannot fix and match sync/async functions in JS.)

Or is there a deeper constraint/issue here preventing support for those?

This library just doesn't support async iterables right now, but it could if support for them was added. It would basically mean that all the existing functions would have to be duplicated, and perhaps exposed as asyncMap, asyncFilter, etc.

@github-actions github-actions bot added the Stale label Apr 8, 2023
Repository owner deleted a comment from github-actions bot Apr 8, 2023
@nvie nvie removed the Stale label Apr 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants