p-each-series
Install
$ npm install --save p-each-seriesUsage
const pEachSeries = require('p-each-series');
const keywords = [
getTopKeyword() //=> Promise
'rainbow',
'pony'
];
const iterator = el => saveToDiskPromise(el); //=> Promise
pEachSeries(keywords, iterator).then(result => {
console.log(result);
//=> ['unicorn', 'rainbow', 'pony']
});API
pEachSeries(input, iterator)
input
iterator(element, index)
Related
License
Last updated