A wrapper over Promise.allSettled that returns results keyed by object properties.
npm install @empjourney/keyed-promiseA tiny utility wrapping Promise.allSettled that works with keyed objects instead of arrays, making it easier to access results by key.
``bash`
npm install keyed-promise
`ts
import { keyedAllSettled } from "keyed-promise";
const promises = {
user: fetchUser(),
posts: fetchPosts(),
stats: fetchStats()
};
const results = await keyedAllSettled(promises);
if (results.user.status === "fulfilled") {
console.log(results.user.value);
}
``