Is it possible to create a throttle function that can take in as parameters another function (that also has parameters), and the time delay
- by Stan Quinn
So I've already written a function that works (based on underscores throttle) for functions that don't take in a parameter, but I'd like to make it generic enough to pass in a function with a variable number of parameters. Here's what I have:
(function () {
var lastTime = new Date().getTime();
function foo() {
var newTime =…