function debounce()

in src/main/resources/SLING-INF/etc/clientlibs/repl/script.js [28:40]


    function debounce(fn, delay) {
        var timer = null;

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

            clearTimeout(timer);
            timer = setTimeout(function () {
                fn.apply(context, args);
            }, delay);
        };
    }