Closed dilipkumar2k6 closed 4 years ago
The mapper
waits for a promise/async-function, so you can use https://github.com/sindresorhus/delay in there.
(async () => {
const mapper = async element => {
// something here
await delay(1000);
// something here
};
const result = await pMap(array, mapper, {concurrency: 2});
})();
Between two consecutive call, I would like to add
delay
, is it possible?