Skip to main content
28 events
when toggle format what by license comment
S Jan 5, 2021 at 13:31 history suggested Ahmad Habib CC BY-SA 4.0
Removed extra characters
Jan 5, 2021 at 13:30 review Suggested edits
S Jan 5, 2021 at 13:31
Aug 30, 2017 at 8:34 history edited Bergi CC BY-SA 3.0
deleted 52 characters in body
May 23, 2017 at 12:10 history edited URL Rewriter Bot
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Aug 31, 2016 at 13:36 comment added a learner has no name @Bergi Thanks for the quick answer! I had hoped there would be a 'simple' solution (like the one I indicated: stepping through the generator and on each turn passing in the resolved value of the last promise), but it doesn't seem so.
Aug 31, 2016 at 13:21 comment added Bergi @DanielMH You can do it manually without any helper function, but that is always laborious and error-prone. I can absolutely not recommend it. But unless you cannot use a transpiler, you'd be using async/await anyway.
Aug 31, 2016 at 13:03 comment added a learner has no name Is there a (not too laborious) way to avoid using Promise.coroutine (i.e., not using Bluebird or another library, but only plain JS) in the ECMAScript 6 example with the generator function? I had in mind something like steps.next().value.then(steps.next)... but that didn't work.
Mar 6, 2016 at 11:17 comment added Bergi @granmoe: I posted the whole discussion on purpose as a canonical duplicate target
Mar 6, 2016 at 5:46 comment added granmoe I'm curious, why did you answer your own question immediately after asking it? There is some good discussion here, but I'm curious. Maybe you found your answers on your own after asking?
Feb 10, 2016 at 17:41 history edited Bergi CC BY-SA 3.0
added 367 characters in body
Oct 28, 2015 at 15:02 history edited Bergi CC BY-SA 3.0
Linkfix
Aug 28, 2015 at 21:12 comment added Bergi @arisalexis: Yes, getExample is still a function that returns a promise, working just like the functions in the other answers, but with nicer syntax. You could await a call in another async function, or you could chain .then() to its result.
Aug 28, 2015 at 17:51 comment added arisalexis @Bergi do you need to await the async function examle getExample() from outside code?
May 17, 2015 at 23:10 vote accept Bergi
May 17, 2015 at 23:08 vote accept Bergi
S May 17, 2015 at 23:08
May 17, 2015 at 23:08 vote accept Bergi
S May 17, 2015 at 23:08
May 17, 2015 at 23:07 vote accept Bergi
May 17, 2015 at 23:07
May 17, 2015 at 23:06 vote accept Bergi
May 17, 2015 at 23:07
May 17, 2015 at 23:06 vote accept Bergi
May 17, 2015 at 23:06
May 17, 2015 at 23:06 vote accept Bergi
May 17, 2015 at 23:06
May 17, 2015 at 23:06 vote accept Bergi
May 17, 2015 at 23:06
May 17, 2015 at 23:05 vote accept Bergi
May 17, 2015 at 23:05
May 17, 2015 at 23:04 vote accept Bergi
May 17, 2015 at 23:05
May 17, 2015 at 23:01 vote accept Bergi
May 17, 2015 at 23:04
May 16, 2015 at 21:40 history edited Bergi CC BY-SA 3.0
added 43 characters in body
Feb 20, 2015 at 12:36 history edited Bergi CC BY-SA 3.0
added 82 characters in body
Feb 6, 2015 at 8:44 vote accept Bergi
May 17, 2015 at 23:00
Jan 31, 2015 at 10:43 history answered Bergi CC BY-SA 3.0