UNPKG

@hashgraph/hedera-local

Version:

Developer tooling for running Local Hedera Network (Consensus + Mirror Nodes).

20 lines 533 B
"use strict"; // SPDX-License-Identifier: Apache-2.0 Object.defineProperty(exports, "__esModule", { value: true }); /** * Limit the execution of a function to once every N ms */ const debounce = (func, delay) => { let timerActive = false; return (...args) => { if (!timerActive) { timerActive = true; func(...args); setTimeout(() => { timerActive = false; }, delay); } }; }; exports.default = debounce; //# sourceMappingURL=debounce.js.map