The ES6 specification only accepts iterators for an argument to Promise.all().
In Dojo 1, our promise implementation used to accept either an Array or an Object map. When dealing with a complex promise situation, it is very handy to have a named result set, versus just an index based one.
@sebilasse requested we consider adding it to the Promise implementation in dojo-shim (see: dojo/shim#38) but that would mis-align the Promise implementation. We do have Task where we could put that, but since .all() is a static method, we could also create a promise.all function that also accepted an iterator or an object map.
The ES6 specification only accepts iterators for an argument to
Promise.all()
.In Dojo 1, our promise implementation used to accept either an
Array
or anObject
map. When dealing with a complex promise situation, it is very handy to have a named result set, versus just an index based one.@sebilasse requested we consider adding it to the
Promise
implementation indojo-shim
(see: dojo/shim#38) but that would mis-align thePromise
implementation. We do haveTask
where we could put that, but since.all()
is a static method, we could also create apromise.all
function that also accepted an iterator or an object map.