"waiting" On Either A Promise Or Regular Object Using Native(es6) Javascript Promises
I played with promises a few times a few years ago using either jQuery or Q. I'm now quite rusty and want to learn and use the new native ES6 promises. I seem to remember one neat
Solution 1:
Both jQuery's $.when()
and ES6's Promise.all()
exhibit the behaviour you refer to. Provide a promise and the function waits for the promise to resolve, but for any other value it returns immediately.
Post a Comment for ""waiting" On Either A Promise Or Regular Object Using Native(es6) Javascript Promises"