github-pages-deploy-action/node_modules/p-each-series/index.js

17 lines
346 B
JavaScript
Raw Permalink Normal View History

2020-03-31 20:42:07 +08:00
'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;