Used when you need Promise.all()
but you want it to resolve to an array even if an item rejects.
Assume we have Promises a
, b
, and c
.
Also assume that b
rejects with an Error
.
With await Promise.all([a, b, c])
, will throw an Error
.
With await Promise.notAll([a, b, c])
, the result would be an array like: [resultOfA, null, resultOfB]
, instead of throwing an Error
.