This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Promise = require('bluebird'); | |
var funcs = Promise.resolve([100, 200, 300, 400].map((n) => makeWait(n))); | |
console.log('first with {concurrency: 1}'); | |
funcs | |
.map(iterator, {concurrency: 1}) | |
.then(function(r) { console.log('Resolved with', r) } ) | |
.then(function() { | |
console.log('then with mapSeries'); |