worked on GarageApp stuff
This commit is contained in:
parent
60aaf17af3
commit
eb606572b0
51919 changed files with 2168177 additions and 18 deletions
23
node_modules/@mui/utils/debounce/debounce.js
generated
vendored
Normal file
23
node_modules/@mui/utils/debounce/debounce.js
generated
vendored
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = debounce;
|
||||
// Corresponds to 10 frames at 60 Hz.
|
||||
// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.
|
||||
function debounce(func, wait = 166) {
|
||||
let timeout;
|
||||
function debounced(...args) {
|
||||
const later = () => {
|
||||
// @ts-ignore
|
||||
func.apply(this, args);
|
||||
};
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(later, wait);
|
||||
}
|
||||
debounced.clear = () => {
|
||||
clearTimeout(timeout);
|
||||
};
|
||||
return debounced;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue