JS debounce/throttle portmanteau, now with callback taste.
Supports error-first Node.js-styled callbacks.
npm install --save ng-debottle
bower install --save ng-debottle
var debounce = require('debottle').debounce;
var throttle = require('debottle').throttle;
function fn() { ... }
function optionalCallback(err, data) { ... }
var throttledFn = throttle(fn, null, optionalCallback);
var debouncedFn = debounce(fn, 100, optionalCallback);
throttledFn();
throttledFn();
...
debouncedFn();
debouncedFn();
...