%PDF- %PDF-
Direktori : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/node_modules/@material-ui/core/esm/utils/ |
Current File : /home/emergentqj/actioncivile/pre-auth/.f81b4c9eb38fd76cdf20462cf2027aa3/static/node_modules/@material-ui/core/esm/utils/debounce.js |
// Corresponds to 10 frames at 60 Hz. // A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B. export default function debounce(func) { var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 166; var timeout; function debounced() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } // eslint-disable-next-line consistent-this var that = this; var later = function later() { func.apply(that, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); } debounced.clear = function () { clearTimeout(timeout); }; return debounced; }