/*
 * Copyright (C) 2016-2020 Kano Computing Ltd.
 * License: http://www.gnu.org/licenses/gpl-2.0.txt GNU General Public License v2
 */
export function debounce(func, wait) {
    let timeout;
    return (...args) => {
        const later = () => {
            timeout = null;
            func(...args);
        };
        clearTimeout(timeout || undefined);
        timeout = window.setTimeout(later, wait);
    };
}
export default debounce;
//# sourceMappingURL=debounce.js.map