login/node_modules/p-each-series/index.js
Balaga Gayatri 74dd83c7c8 node_modules
2021-10-22 12:50:18 +05:30

16 lines
346 B
JavaScript

'use strict';
const pEachSeries = async (iterable, iterator) => {
let index = 0;
for (const value of iterable) {
// eslint-disable-next-line no-await-in-loop
await iterator(await value, index++);
}
return iterable;
};
module.exports = pEachSeries;
// TODO: Remove this for the next major release
module.exports.default = pEachSeries;