In Koa, I can access the Koa Context in the first generator function through this :
app.use(function *(){ this;
But if I succumb to another function of the generator, I can no longer access the context through this .
app.use(function *(){ yield myGenerator(); } function* myGenerator() { this.request;
I could just pass the context to the second function of the generator, but I wondered if there was a cleaner way to access the context.
Any ideas?
source share