MCPcopy Create free account
hub / github.com/ionic-team/ionic-framework / debounce

Function debounce

core/src/utils/helpers.ts:348–354  ·  view source on GitHub ↗
(func: (...args: any[]) => void, wait = 0)

Source from the content-addressed store, hash-verified

346};
347
348export const debounce = (func: (...args: any[]) => void, wait = 0) => {
349 let timer: any;
350 return (...args: any[]): any => {
351 clearTimeout(timer);
352 timer = setTimeout(func, wait, ...args);
353 };
354};
355
356/**
357 * Check whether the two string maps are shallow equal.

Callers 2

componentDidLoadMethod · 0.90
debounceEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected