// https://gist.github.com/ca0v/73a31f57b397606c9813472f7493a940
export const debounce = (func, waitFor) => {
    let timeout = null;
    const debounced = (...args) => {
        if (timeout !== null) {
            clearTimeout(timeout);
            timeout = null;
        }
        timeout = setTimeout(() => func(...args), waitFor);
    };
    return debounced;
};
//# sourceMappingURL=debounce.js.map