better-all
Better Promise.all with automatic dependency optimization
better-all is a TypeScript library that reinvents the familiar Promise.all construct by automatically analyzing and optimizing dependency graphs between asynchronous tasks, enabling maximal parallelization without manual orchestration. It addresses a common limitation where developers must manually refactor their promise chains to achieve efficient concurrency when some tasks depend on others, which can be error-prone and hard to maintain. With an object-based API, each task is declared as an asynchronous function that can reference other task results using a magical this.$ context, allowing the library to kick off independent operations immediately and only wait for dependent results when needed. ...