I am processing an array using Promise.map. For each element I am performing an async operation which returns a promise. However, I want to introduce some delay between each call because the downstream has a limit on the number of requests. Here is what I want to do
return Promise.map(array, function (elem){
// perform an async call using elem
// wait for 500 ms
})
How can I achieve the same ?