Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // debounce :: Number -> (Args -> Any) -> (Args -> Undefined)
- // Args = Any
- export const debounce = time => (fn) => {
- let timeout;
- return (...args) => {
- clearTimeout(timeout);
- timeout = setTimeout(() => fn(...args), time);
- };
- };
Add Comment
Please, Sign In to add comment