Promise.all(Object.values(myObjWithPromiseValues)).then(...)

On Fri, Oct 11, 2019 at 10:22 AM Jordan Harband <[email protected]> wrote:

> The current API accepts an *iterable*, which means any object that has
> `Symbol.iterator`, such as an array or a Set.
>
> Throwing when it receives a non-iterable object is an important tool to
> catch bugs. If Promise.all was made to accept a non-iterable object as
> well, I suspect many bugs would go uncaught.
>
> On Fri, Oct 11, 2019 at 10:15 AM Adam Eisenreich <[email protected]> wrote:
>
>> Back when async/await was introduced I struggeled quite a bit with
>> promises arrays that have conditional promises. RxJS is moving from array
>> only support in theirs operators to objects too, there seems to be an
>> actual trend going on. Is there any reason against?
>> _______________________________________________
>> es-discuss mailing list
>> [email protected]
>> https://mail.mozilla.org/listinfo/es-discuss
>>
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to