var Q = require('q')
Q.map = require('q-map').map
var myArray = [1,2,3,4,5,6,7,8]
// Limits promise concurrency to 3
Q.map(myArray, function(element) {
return promiseFactory(element)
}, 3)
.then(function(resolvedArray) {
doStuff()
})
michaelchihuyho/q-map
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A utility for throttling Q promises created using map()
Resources
Stars
Watchers
Forks
Packages 0
No packages published