UNPKG

@kiwicom/smart-faq

Version:

Smart FAQ

11 lines (9 loc) 210 B
// @flow export const debounce = ( fn: any => any, timeout: number = 250, interval?: TimeoutID, ) => (...args: any) => { clearTimeout(interval); interval = setTimeout(() => fn(...args), timeout); };