mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-08-20 05:36:37 +08:00
8 lines
214 B
JavaScript
8 lines
214 B
JavaScript
// Debounce function
|
|
export function debounce(func, wait) {
|
|
let timeout;
|
|
return function(...args) {
|
|
clearTimeout(timeout);
|
|
timeout = setTimeout(() => func.apply(this, args), wait);
|
|
};
|
|
}
|