MCPcopy Create free account
hub / github.com/facebook/memlab / debounce

Method debounce

packages/e2e/src/ScriptManager.ts:158–167  ·  view source on GitHub ↗
(callback: AnyFunction, timeout: number)

Source from the content-addressed store, hash-verified

156 }
157
158 private debounce(callback: AnyFunction, timeout: number): void {
159 if (this.metaFileWriteTimeout) {
160 clearTimeout(this.metaFileWriteTimeout);
161 this.metaFileWriteTimeout = null;
162 }
163 this.metaFileWriteTimeout = setTimeout(() => {
164 callback();
165 this.metaFileWriteTimeout = null;
166 }, timeout);
167 }
168}

Callers 1

logScriptMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected