Commit fa18f481 authored by Thomas Juster's avatar Thomas Juster 🛀
Browse files

docs(readme): suggest another example

parent 39411c54
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -58,7 +58,11 @@ async function doStuff (): Promise<void> {
    // pool will execute the following promises in the correct order respecting the concurrency option provided
    pool.resolve(() => fetch('https://example.com/')),
    pool.resolve(() => fetch('https://wordscape.com/')),
    pool.resolve(() => fetch('https://en.wikipedia.org/')),
    pool.resolve(async () => {
      const response = await fetch('https://en.wikipedia.org/')
      // … do anything else you need
      return response
    }),
    // and so on…
  ])
}