Shortly about the task. We have an array of promises that could either resolve or reject. To understand whether total result is good or not - we need to know results of all promises in array.
In JQuery (our usual go-to library for promises) $.when.apply()
works in a way that if one of the promises in array is rejected - main promise for the whole array is instantly rejected too, without waiting for all array element results, so this solution is not an option.
In Q library there's a .allSetteled()
method that does the thing nicely. But I was wondering if there is some way to implement the same functionality using JQuery (because we're already using it in the project).
Any help appreciated! Thanks!