I was having a hard time understanding ES2015 yield, specifically the fact that you can call an async function with sync style, and most of my question where solved by this answer https://stackoverflow.com/a/18904835/1540114
You can write async code in sync style inside them (e.g. generators) because they can yield. But you need a companion function that creates the generator, handles the callbacks and resumes the generator with a next call every time a callback fires.
Is there an official name for what he calls a "companion function", I saw codes using a "run" function and other using "spawn" ? And is there a native "companion function" or do we have to use a library ?