🎨 Improve code readability by reformatting functions and cleaning up whitespace

This commit is contained in:
2026-01-28 19:50:00 +00:00
parent b3d6bb0772
commit 07c4379d81
6 changed files with 319 additions and 14 deletions

View File

@@ -65,7 +65,7 @@ export function getDevicePerformance() {
*/
export function debounce(fn, delay = 300) {
let timeoutId;
return function (...args) {
clearTimeout(timeoutId);
timeoutId = setTimeout(() => fn.apply(this, args), delay);
@@ -80,7 +80,7 @@ export function debounce(fn, delay = 300) {
*/
export function throttle(fn, limit = 100) {
let inThrottle;
return function (...args) {
if (!inThrottle) {
fn.apply(this, args);