/
githubmirror
/
amphtml
Обзор
Документация
Войти
/
githubmirror
/
amphtml
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
build-system/common/debounce.js
19 строк
559 B
Kristofer Baxter
♻️ Remove Notice from JS and Markdown (#35717)
19 авг 2021, 21:21
Не верифицирован
19 авг 2021, 21:21
f564b7e
Код
Авторство
О чём код?
const lodashDebounce = require('lodash.debounce'); /** * 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} wait * @return {function(...S):T} * @template S * @template T */ function debounce(func, wait) { return lodashDebounce(func, wait, {leading: true, trailing: true}); } module.exports = debounce;