promise-one
Promise that at least one promise will resolve
Example
const promiseOne =
API
promiseOne([promise1, ...]) -> Promise
- Accepts an array of promises
- Resolves as soon as one of the promises resolves
- Rejects only if all of the promises reject
Notes
- Rejections will disappear if any promise resolves, with no way to get them.
- If all promises reject, their errors will be available on the rejected reason
under the
errors
key in the order they were specified in the original array.
License
MIT