@beisen/es6-promise-debounce

    0.0.4 • Public • Published

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

    Install

    npm i @beisen/es6-promise-debounce

    DownloadsWeekly Downloads

    55

    Version

    0.0.4

    License

    ISC

    Unpacked Size

    37.9 kB

    Total Files

    10

    Last publish

    Collaborators

    • beisencorp