Limitor is a class based implementation of a function rate limiter / debouncer. It uses setInterval to create a running clock used to enforce the rate, and reset every x millisecons. See the source for details.
Basic Usage
Create an instance of Limitor. *Limitor(maxOperations, maxInterval, verbose=false)
var lm = new Limitor(3, 2000, true); lm.init();
Basic function to execute.
let addNums = (x, y) => { result = x + y; console.log(result); }
Run function through the lm instance.
lm.exec(() => { addNums(2,3); })