Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
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
.
0.2.3
FAQs
Map over array avoiding parallel execution, using promises
The npm package promise-map-series receives a total of 698,236 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.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.