A utility that resolves promises in Map and Object structures while preserving keys, similar to Promise.all().
p-props is a JavaScript utility library that functions like `Promise.all()` but for `Map` and `Object` data structures. It resolves multiple promises concurrently while preserving the original keys, making it ideal for handling asynchronous operations in structured data. The library also includes an `allSettled` variant for comprehensive error handling without stopping execution.
JavaScript developers working with asynchronous operations in keyed collections, such as APIs that return object-based data or applications managing concurrent promises with identifiable keys.
Developers choose p-props for its simplicity and specificity—it solves a common pain point of managing promises in objects and maps without custom boilerplate, and it integrates seamlessly with existing promise-based workflows and related libraries like p-map.
Like Promise.all() but for Map and Object
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Maintains the original keys with resolved values, as shown in the example where sites object keys map directly to fetched HTML bodies, eliminating manual reconstruction.
Runs all promises simultaneously like Promise.all, improving performance over sequential handling for structured data.
Includes pPropsAllSettled for handling both fulfilled and rejected promises without stopping, similar to Promise.allSettled, enhancing error resilience.
Automatically passes non-promise values unchanged, simplifying mixed data structures without extra checks, as demonstrated with the 'foo: bar' example.
Specifically designed for objects and maps, making it overkill for array-based promise handling where native Promise.all is sufficient.
Relies on p-map for options configuration, adding an extra dependency and learning curve for advanced features like concurrency control.
Requires modern JavaScript environments with Promise support, which might not be suitable for legacy systems without polyfills.