performance
Chủ đề
1 đoạn mã được tìm thấy
1 đoạn mã được tìm thấy
A utility function that limits how often a function can fire, useful for search input or resize events.
1function debounce(fn, delay = 300) {
2 let timeout;
3 return (...args) => {
4 clearTimeout(timeout...