A promise library for JavaScript
Browse cluster: WebAssembly Specification and Proposals →q is a promise library for JavaScript built to handle asynchronous operations where functions cannot return values immediately. The library implements a deferred pattern that separates promises (which observe resolution) from resolvers (which determine resolution), allowing asynchronous code to be composed elegantly while propagating errors implicitly. The design documentation walks through the incremental construction of the library, explaining how promises can be chained using a "then" method that returns new promises, enabling callbacks to be registered before or after resolution and permitting straightforward composition of multiple asynchronous operations.