Initial commit

This commit is contained in:
2026-08-24 22:20:36 +02:00
commit 62f7b1278a
251 changed files with 16670 additions and 0 deletions
+21
View File
@@ -0,0 +1,21 @@
class Limiter {
constructor(info) {
this.countThreshold = info.countThreshold;
this.timeThreshold = info.timeThreshold;
this.nextTime = 0;
this.time = 0;
this.count = 0;
};
update() {
if (performance.now() - this.time < this.timeThreshold) this.count++;
else {
this.time = performance.now();
this.count = 1;
};
return this.count > this.countThreshold;
}
};
module.exports = Limiter;