title: Delaying and Throttling an array of Promises with Promise.all?
body: <p>I have an array of endpoints I'd like to query like so:
  <code>const apiList = ['/api1', '/callme', '/thisonetoo']</code></p>
  
  <p>Using axios, a promise based library, I can dynamically generate a promise by mapping the array -></p>
  
  <pre><code>Promise.all(apiList.map(name =&gt; promiseGet(name))).then(res =&gt; ...)
  </code></pre>
  
  <p>This works fine... but it calls the server too fast, and some of the apis get denied, which causes the entire program to mess up.</p>
  
  <p>Is there a way to throttle / debounce and wait 500ms before creating or calling the next endpoint?</p>
  
  <p>Limiting the amount of Promises open isn't enough it seems. I have to perform some sort of "sleep" operation and wait a little bit before calling the next api endpoint in the array.</p>