MCPcopy
hub / github.com/ampproject/amphtml / debounce

Function debounce

build-system/common/debounce.js:15–17  ·  view source on GitHub ↗

* Creates a debounced function that delays invoking func until after wait * milliseconds have elapsed since the last time the debounced function was invoked. * * Notably, invokes the function both the leading and trailing edges of the event. * * @param {function(...S):T} func * @param {number}

(func, wait)

Source from the content-addressed store, hash-verified

13 * @template T
14 */
15function debounce(func, wait) {
16 return lodashDebounce(func, wait, {leading: true, trailing: true});
17}
18
19module.exports = debounce;

Callers 8

doServeFunction · 0.50
watchExtensionFunction · 0.50
compileJsFunction · 0.50
analyticsVendorConfigsFunction · 0.50
buildVendorConfigsFunction · 0.50
buildStoryLocalizationFunction · 0.50
compileCssFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected