Get the latest tech news

Delimited Generators – A more natural API for JS generators


I have been studying ways to work around the horrors issues of JavaScript's async APIs for years. I have even built a series of increasing...

So I built delimgen, a thin layer on top of plain generators, that mimics delimited control. Delimited control is initially hard to understand, but once you grok it it's a very natural approach ( previous post). You also cannot do anything with this library that you couldn't do with plain generators, but for me, seeing that you can write quasi-blocking code in JS with some small overhead was a real eye opener.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of API

API

Photo of natural API

natural API

Photo of Delimited Generators

Delimited Generators

Related news:

News photo

Chilean instant payments API startup Fintoc raises $7 million to turn Mexico into its main market

News photo

More enterprise-grade features for API customers

News photo

Run Meta Llama 3 with an API