export function debounce()

in src/app/services/analytics.service.ts [20:28]


export function debounce(callback: Function, wait: number) {
    let timeoutId = null;
    return (...args: any) => {
        window.clearTimeout(timeoutId);
        timeoutId = window.setTimeout(() => {
            callback(...args);
        }, wait);
    };
}