export default (mainFunction: any, delay: number) => {
    let timer: any;
    return function (arg = '') {
        clearTimeout(timer);
        timer = setTimeout(() => mainFunction(arg), delay);
    };
};
