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

Function debounceEvent

core/src/utils/helpers.ts:340–346  ·  view source on GitHub ↗
(event: EventEmitter, wait: number)

Source from the content-addressed store, hash-verified

338};
339
340export const debounceEvent = (event: EventEmitter, wait: number): EventEmitter => {
341 const original = (event as any)._original || event;
342 return {
343 _original: event,
344 emit: debounce(original.emit.bind(original), wait),
345 } as EventEmitter;
346};
347
348export const debounce = (func: (...args: any[]) => void, wait = 0) => {
349 let timer: any;

Callers 5

debounceChangedMethod · 0.90
debounceChangedMethod · 0.90
debounceChangedMethod · 0.90
debounceChangedMethod · 0.90
deferEventFunction · 0.85

Calls 1

debounceFunction · 0.85

Tested by

no test coverage detected