Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
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 value or promises. All promises are resolved
before running the iterator. If any are rejected, mapSeries
returns a
rejected promise immediately and does not call iterator
.
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 the 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.
nonPromiseArray
: A copy of the original array
with all promises
resolved.
thisArg
(optional): Value to use as this
when executing iterator
.
0.1.0
FAQs
Map over array avoiding parallel execution, using promises
The npm package promise-map-series receives a total of 568,232 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.