Subversion Repositories eFlore/Applications.cel

Rev

Rev 3845 | Blame | Compare with Previous | Last modification | View Log | RSS feed

export function debounce (callback, delay) {
    let timer;
    return function(){
        const args = arguments;
        const context = this;
        clearTimeout(timer);
        timer = setTimeout(function(){
            callback.apply(context, args);
        }, delay)
    }
}