All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.src.utils.debounce.js Maven / Gradle / Ivy

There is a newer version: 3.14.1
Show newest version

export function debounce(func, wait) {
    var timeout

    return function() {
        var context = this, args = arguments

        var later = function () {
            timeout = null

            func.apply(context, args)
        }

        clearTimeout(timeout)

        timeout = setTimeout(later, wait)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy