Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/moszeed/es6-promise-debounce

a debounce for promises
https://github.com/moszeed/es6-promise-debounce

Last synced: about 20 hours ago
JSON representation

a debounce for promises

Awesome Lists containing this project

README

        

#es6-promise-debounce
a debounce function for promises

#example

var debounce = require('es6-promise-debounce');

var debouncedFunction = debounce(function() {
return new Promise(function(resolve) {
resolve();
});
}, 200);

debouncedFunction().then(function() { console.log('this one should be ignored'); });
debouncedFunction().then(function() { console.log('this one should be executed'); });