Skip to content
This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
/ debottle Public archive

JS debounce/throttle portmanteau, now with callback taste

License

Notifications You must be signed in to change notification settings

ex-machine/debottle

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

JS debounce/throttle portmanteau, now with callback taste

Resources

License

Stars

Watchers

Forks

Packages

No packages published