4 ms·
These arguments can be also applied to promise and await. And they almost ultimately won these days. Sure, you need to implement the then function or whatever p
by mmis1000 3y ago
These arguments can be also applied to promise and await. And they almost ultimately won these days. Sure, you need to implement the then function or whatever properly or it won't play nicely with code other wrote. But once enough people adopted it, it's almost no way to go back.
If you are a big library author and you don't bother to, probably other will just write a wrapper(request-promise for example) or make a clone with that buildin(there are so many and it's pointless to count). It's FOSS anyway.
- maxfurman 3y agoYou can await values that aren't already async in JS. IIRC the runtime turns it into the equivalent of `await Promise.resolve(x)`.