diff --git a/src/fireedge/src/public/utils/helpers.js b/src/fireedge/src/public/utils/helpers.js index a683912db1..94cab89185 100644 --- a/src/fireedge/src/public/utils/helpers.js +++ b/src/fireedge/src/public/utils/helpers.js @@ -1,18 +1 @@ export const fakeDelay = ms => new Promise(resolve => setTimeout(resolve, ms)); - -export const debounce = (func, delay, immediate) => { - let timerId; - return (...args) => { - const boundFunc = func.bind(this, ...args); - clearTimeout(timerId); - if (immediate && !timerId) { - boundFunc(); - } - const calleeFunc = immediate - ? () => { - timerId = null; - } - : boundFunc; - timerId = setTimeout(calleeFunc, delay); - }; -};