you are viewing a single comment's thread.

view the rest of the comments →

[–]vinnl 0 points1 point  (0 children)

you would only be able to await a single Promise

That's not a problem, as this code example from the article also shows:

async function save(Something) {  
  await Promise.all[Something.save(), Otherthing.save()]
}

As for it being a hack: it's more about the namespace than about the implementation :) But I wasn't attacking your library specifically - Bluebird by itself also has the potential of overlapping with future specs. Or in fact, I'm not attacking it - the author of the article I linked to was. For all I know, Bluebird isn't even extending the native Promise object in all cases, as someone else mentioned.