
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.
promise-map-series
Advanced tools
Call an iterator function for each element of an array in series, ensuring that no iterator is called before the promise returned by the previous iterator is fulfilled, in effect preventing parallel execution. Like async.mapSeries, but for promises.
npm install --save promise-map-series
var mapSeries = require('promise-map-series')
mapSeries(array, iterator[, thisArg]).then(function (newArray) {
...
})
array: An array of values (should not be promises).
iterator: Function that returns a promise or a value for the new
array. The iterator will be called once for each element. If iterator
returns a promise, then iterator will only be called for the next element
once that promise is fulfilled. If the promise is rejected or iterator
throws an error, iteration will stop immediately and mapSeries returns a
rejected promise. The iterator function receives three arguments:
item: The current item in the array.
index: The current index in the array.
array: The original array argument.
thisArg (optional): Value to use as this when executing iterator.
p-map-series is a similar package that also maps over an array of items and applies a promise-returning function to each item in series. It is similar to promise-map-series in functionality but is part of the 'p-*' series of promise utilities by Sindre Sorhus, which are known for their simplicity and reliability.
The async package provides a wide range of utilities for working with asynchronous JavaScript, including a series method that can be used to run an array of functions in series. While it offers more features than promise-map-series, it is also heavier and more complex.
Bluebird is a fully-featured promise library that includes a mapSeries method for sequentially processing an array of items. It offers more advanced features and optimizations compared to promise-map-series, but it is also a larger library.
FAQs
Map over array avoiding parallel execution, using promises
The npm package promise-map-series receives a total of 474,825 weekly downloads. As such, promise-map-series popularity was classified as popular.
We found that promise-map-series 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.