npm.io
1.0.1 • Published 11 years ago

es6-promise-debounce

Licence
MIT
Version
1.0.1
Deps
0
Vulns
0
Weekly
0

#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'); });

Keywords