🎨 Improve code readability by reformatting functions and cleaning up whitespace
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user