HEX
Server: LiteSpeed
System: Linux premium212.web-hosting.com 4.18.0-553.124.4.lve.el8.x86_64 #1 SMP Fri May 15 13:02:13 UTC 2026 x86_64
User: vitanhod (1367)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //proc/self/root/proc/self/root/home/vitanhod/barnabites.es/wp-content/themes/rishi/js/debounce.js
const debounce = (func, delay) => {
    // Declare a variable called 'timeout' to store the timer ID
    let timeout;
    // Return an anonymous function that takes in any number of arguments
    return function (...args) {
        const later = () => {
            func(...args);
        };
        // Clear the previous timer to prevent the execution of 'func'
        clearTimeout(timeout);
        // Set a new timer that will execute 'func' after the specified delay
        timeout = setTimeout(later, delay);
    };
};

export default debounce;