// the find
tj/co
The ultimate generator based flow-control goodness for nodejs (supports thunks, promises, etc)
co is a generator-based async control flow library for Node.js that predates native async/await. It wraps generator functions in promises, letting you write synchronous-looking async code with yield. This was genuinely useful in 2014-2016; today it is a historical artifact.
The core implementation is a single file under 250 lines — reading it is a good way to understand how async/await actually works under the hood. Parallel resolution of arrays and objects with a single yield is clean and still more concise than Promise.all in some cases. Test coverage is thorough across all yieldable types. It shipped on npm early enough that it has 11k stars and is still pulled in transitively by older codebases.
Dead project — last commit in 2020, and even that was maintenance. The problem it solves was standardized into the language in ES2017; there is no reason to reach for this in new code. Thunk support is explicitly kept only for backwards compatibility and described as something to avoid. The README still references Node 0.10 and --harmony-generators flags, which tells you everything about the vintage. If you find this in your dependency tree, it's a sign something upstream hasn't been updated in a very long time.