
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
combine-promises
Advanced tools
[](https://www.npmjs.com/package/combine-promises) [](https://github.com/slorber/combine-promises/actions/work
Like Promise.all([]) but for objects.
import combinePromises from 'combine-promises';
const { user, company } = await combinePromises({
user: fetchUser(),
company: fetchCompany(),
});
Why:
Features:
ThisWeekInReact.com: the best newsletter to stay up-to-date with the React ecosystem:
npm install combine-promises
// OR
yarn add combine-promises
Good, native and strict TypeScript support:
const result: { user: User; company: Company } = await combinePromises({
user: fetchUser(),
company: fetchCompany(),
});
A common error with Promise.all is to have a typo in the destructuring order.
// Bad: destructuring order reversed
const [company, user] = await Promise.all([fetchUser(), fetchCompany()]);
This becomes more dangerous as size of the promises array grows.
With combinePromises, you are using explicit names instead of array indices, which makes the code more robust and not sensitive to destructuring order:
// Good: we don't care about the order anymore
const { company, user } = await combinePromises({
user: fetchUser(),
company: fetchCompany(),
});
Suppose you have an object representing a friendship like {user1: "userId-1", user2: "userId-2"}, and you want to transform it to {user1: User, user2: User}.
You can easily do that:
import combinePromises from 'combine-promises';
import { mapValues } from 'lodash'; // can be replaced by vanilla ES if you prefer
const friendsIds = { user1: 'userId-1', user2: 'userId-2' };
const friends = await combinePromises(mapValues(friendsIds, fetchUserById));
Without this library: good luck to keep your code simple.
Name inspired by combineReducers from Redux.
FAQs
[](https://www.npmjs.com/package/combine-promises) [](https://github.com/slorber/combine-promises/actions/work
The npm package combine-promises receives a total of 255,242 weekly downloads. As such, combine-promises popularity was classified as popular.
We found that combine-promises demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.