Andrey (azangru) wrote,
Andrey
azangru

Achievement unlocked: today, for the first time, I wrote an asynchronous iterator. Using an async generator (also for the first time; I never felt a need for them before), nothing as fancy as writing it completely from scratch as an object with Symbol.asyncIterator. I wanted to transform an array of strings into a chain of sequentially executed promises. Previously, I would have used a .reduce starting with a Promise.resolve(). But this time, I tried the async generator syntax, and it seems to have worked beautifully.
Subscribe

  • (без темы)

    Also, Google's documentation style guide. With the latest trends about the correct language, obvi. This one via HN.

  • (без темы)

    Google's document on how they build Chrome dev tools with web components. And yeah, it includes a special dance for some semblance of type safety,…

  • (без темы)

    On the ideology in the industry: A guest on a podcast: There was a thread on Twitter the other day, with Adam Rackis, and he had made a comment…

  • Post a new comment

    Error

    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 0 comments