One Comment

  1. This post got me thinking, we could create a utility that’s a bit more comprehensive than the one in the article, one that will wrap regular generators and let them “act” still like async generators with the full iteration protocol (so they work with for await (..) loops, etc), but where those async generators can still be stopped immediately with a call to return(..).

    I took a stab at such a utility as a proof of concept:

Leave a Reply

Your email address will not be published. Required fields are marked *