Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

promise-map-series

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

promise-map-series - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

yarn.lock

7

CHANGELOG.md
# master
# 0.3.0
* [BREAKING] Drop support for any node but `10.* || >= 12.*`
* Use async/await directly
* Drop RSVP
* Upgrade Test Dependencies
# 0.2.3

@@ -4,0 +11,0 @@

19

index.js

@@ -1,16 +0,11 @@

var Promise = require('rsvp').Promise;
module.exports = async function promiseMapSeries(array, iterator, thisArg) {
const length = array.length;
const cb = arguments.length > 2 ? iterator.bind(thisArg) : iterator;
const results = new Array(length);
module.exports = function promiseMapSeries(array, iterator, thisArg) {
var length = array.length
var current = Promise.resolve()
var results = new Array(length)
var cb = arguments.length > 2 ? iterator.bind(thisArg) : iterator
for (var i = 0; i < length; ++i) {
current = results[i] = current.then(function(i) {
return cb(array[i], i, array)
}.bind(undefined, i))
for (let i = 0; i < length; ++i) {
results[i] = await cb(array[i], i, array);
}
return Promise.all(results)
return results;
}
{
"name": "promise-map-series",
"description": "Map over array avoiding parallel execution, using promises",
"version": "0.2.3",
"version": "0.3.0",
"author": "Jo Liss <joliss42@gmail.com>",
"main": "index.js",
"files": [
"index.js"
],
"license": "MIT",

@@ -15,8 +12,8 @@ "repository": {

},
"dependencies": {
"rsvp": "^3.0.14"
},
"devDependencies": {
"tape": "^2.5.0"
"tape": "^4.11.0"
},
"engines": {
"node": "10.* || >= 12.*"
},
"scripts": {

@@ -23,0 +20,0 @@ "test": "tape test.js"

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc