fetchify
import { Limiter } from "https://deno.land/x/fetchify@0.2.4/mod.ts";
const endpoint = "https://jsonplaceholder.typicode.com";
const limit = new Limiter({
rps: 3,
});
for (let i = 20; i--;) {
console.log(`push to queue ${i}`);
limit.fetch(`${endpoint}/posts/${i}`).finally(() => {
console.log(`finally ${i}`);
});
}