Sequentially reduce a collection to a single value using promises. p-reduce iterates over an iterable, applying an asynchronous reducer function to each element. Similar to Array.prototype.reduce, it leverages Promises to handle asynchronous operations within the reduction process. Ideal for processing large datasets or performing I/O-bound tasks within a sequence, providing a cleaner alternative to nested Promises or callbacks. It supports custom initial values and ensures proper error propagation.
The npm package p-reduce has seen infrequent releases. Initial release was in October 2016 (v1.0.0). Two versions were released in 2019 (v2.0.0, v2.1.0). The most recent release was in April 2021 (v3.0.0). There have been no releases since April 2021.
P-reduce downloads surged throughout 2024 and 2025, peaking in June 2025 at nearly 35 million. While remaining high, downloads experienced some fluctuation. September 2025 data reflects only partial month statistics showing a significant decrease, indicating incomplete data.