Functional Promise-Based Libraries

Back in the ES5 era I wrote a Promises/A+ named legendary. Its theme song is embedded above. Legendary came with plenty of sugar methods, timeout and cancellation handling, functional utilities, and the ability to subclass the Promise constructor. That resulted in the Series subclass which enabled functional composition of promises-for-arrays.

That same idea was applied to streams in streamist.

Built on top of both modules was helo, a promise-based HTTP request handling stack. The stack model supported customizing the request object and adding middleware, as well as default error responses and various response formatting helpers.

Finally aitch was a toolkit for constructing hypertext service clients. It abstracted clients from transports and had subclassable request and response objects (the latter being a Promise subclass!)

These libraries are still used in various Node services powering State. For all intents and purposes though they’re no longer maintained. Their last supported Node.js version is 0.10.