BreakPoint Drop
Adopted

node-thunkify

Turn a regular Node function into one which returns a thunk — for co/koa

#javascript#nodejs#async#utility
Abandoned:
12y ago
License:
MIT

The story

Tj Holowaychuk wrote node-thunkify in 2014 as a tiny utility for the `co` / `koa` era. Before async/await landed, you'd "thunkify" a Node-style-callback function so it returned a thunk you could `yield` to inside a co generator. The package is 19 lines of code and 860 stars. It hasn't been touched since 2018, but it still works on every Node version because there's nothing version-specific in it. If you're maintaining a legacy co/koa codebase (still hundreds of them in production), node-thunkify is still the answer. The maintainer moved on to Go and Rust long before async/await replaced his entire stack.

For maintainers

Have a project of your own?

Two minutes to drop. You stay credited. Someone out there wants to take it on.

Drop a project →

For developers

Not ready to adopt this one?

Browse 3 other waiting projects on the feed. Or use the free audit to see what your own org is depending on.

Browse the feed Free audit