daily pastebin goal
42%
SHARE
TWEET

Untitled

a guest Jan 18th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. export const debounce = (func, delay = 300) => {
  2.   let timeout;
  3.   return function() {
  4.     const self = this, args = arguments;
  5.     const later = function() {
  6.       timeout = null;
  7.       func.apply(self, args);
  8.     };
  9.     clearTimeout(timeout);
  10.     timeout = setTimeout(later, delay);
  11.   };
  12. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top