Add canBatch.debounce
·
54 commits
to master
since this release
Adds canBatch.debounce(fn), which provides an event listener which runs only once per batch.
Example
obj.on("event", canBatch.debounce(function() {
// only runs once per batch
}));
canBatch.start();
obj.dispatch("event");
obj.dispatch("event");
canBatch.stop();