First release

This commit is contained in:
Owen Quinlan 2021-07-02 19:29:34 +10:00
commit fa6c85266e
2339 changed files with 761050 additions and 0 deletions

21
node_modules/throttles/dist/index.mjs generated vendored Normal file
View file

@ -0,0 +1,21 @@
export default function (limit) {
limit = limit || 1;
var queue=[], wip=0;
function toAdd(fn) {
queue.push(fn) > 1 || run(); // initializes if 1st
}
function isDone() {
wip--; // make room for next
run();
}
function run() {
if (wip < limit && queue.length > 0) {
queue.shift()(); wip++; // is now WIP
}
}
return [toAdd, isDone];
}