MCPcopy Create free account
hub / github.com/code100x/daily-code / debounce

Function debounce

apps/web/components/BlogAppbar.tsx:54–62  ·  view source on GitHub ↗
(func: any, delay: any)

Source from the content-addressed store, hash-verified

52 };
53
54 const debounce = (func: any, delay: any) => {
55 let timeoutId: any;
56 return (...args: any) => {
57 clearTimeout(timeoutId);
58 timeoutId = setTimeout(() => {
59 func(...args);
60 }, delay);
61 };
62 };
63
64 const debouncedHandleScroll = debounce(() => {
65 const currentScrollPos = window.scrollY;

Callers 1

BlogAppbarFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected