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
Zip with promises array #2
Comments
Hi @fmo91 , thank you :) |
I think, @fmo91 intends to describe the situation when, for example, you're going to load.. say, admin users with one promise, then managers with another promise. Type of result for both is Promise. And then, when all these promises are fulfilled, he want to get an array of User entities. |
Sorry for the late response. Yes, that's exactly what I'm describing. I have to upload images in base64 to the backend. I'm currently using RxSwift, so each upload returns an Observable, and then I use .zip to merge all these Observable and wait them to complete. |
You can create your promises and use |
Ping :) |
Yes, that's exactly what I was looking for. Thank you! |
U're welcome |
Hey, great library! I have been looking for something like this for a while.
I'd like to suggest that zip should receive an array of promises (if all of them shares the same return type) and a return a promise that combines all the inputs. It could also receive a reduce function as argument. What do you think?
I mean something like this:
Thanks!
The text was updated successfully, but these errors were encountered: