//#region src/shared/tools/debounceFunction.ts
/**
* Debounce function execution to prevent multiple calls in a short period of time.
*
* @param func
* @param timeout
*/
var debounceFunction = (func, timeout = 100) => {
	let timer;
	return (...args) => {
		clearTimeout(timer);
		timer = setTimeout(() => {
			if (typeof func === "function") func.apply(void 0, args);
		}, timeout);
	};
};
//#endregion
export { debounceFunction };
