Skip to content

Instantly share code, notes, and snippets.

@samzhao samzhao/index.js
Created Jun 30, 2018

What would you like to do?
Delayed map helper
const delayedMap = async (list, iterator, delayTime) => {
let promises = [];
for (const item of list) {
await delay(delayTime);
promises.push(await iterator(item));
return Promise.all(promises);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.