-
Notifications
You must be signed in to change notification settings - Fork 28
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
Promise.any? #15
Comments
I think you mean "Promise.race". Yaku supports it by default. The |
It's different. Promise.any will resolve if any of the supplied promises resolve. It will only reject, if all of the promises reject. |
Well, I understand. How about add it to the yuku's utils namespace? |
If you are interested in the ef23611, please make a pull request for it and fix the TODOs. |
In addition, if one promise rejects all the other rejections will go unhandled and unreported with Basically, you have a chance to provide a better API with |
Thanks for implementing this so promptly! 👍 |
It's desirable for me to have Promise.any. (i.e. If any promise resolves, then resolve).
Is it possible to create this method using the existing methods in Yaku? (e.g. I could do something similar to https://github.com/andyjansson/promise-any/blob/master/index.js ).
Is this a good idea? or should I wait for this functionality to appear in Yaku?
The text was updated successfully, but these errors were encountered: