export default function debounce(callback, delay) {
let timeoutId;
return (...args) => {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => {
// eslint-disable-next-line
callback(...args);
}, delay);
};
}