debottle

1.0.1 • Public • Published

debottle

JS debounce/throttle portmanteau, now with callback taste.

Supports error-first Node.js-styled callbacks.

Install

NPM

npm install --save ng-debottle

Bower

bower install --save ng-debottle

Usage

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();
...

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.1
    33
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.1
    33

Package Sidebar

Install

npm i debottle

Weekly Downloads

29

Version

1.0.1

License

MIT

Last publish

Collaborators

  • ex-machine