Warning: session_start(): Session cannot be started after headers have already been sent in /home/tvrreohg/public_html/manga.php on line 13
/**
* Debounce of Underscore.js
*/
export const debounce = function(
func: Function,
wait: number,
immediate: boolean
): Function {
let timeout: number;
return function(): void {
const context = this;
const args = arguments;
clearTimeout(timeout);
timeout = window.setTimeout((): void => {
timeout = null;
if (!immediate) func.apply(context, args);
}, wait);
if (immediate && !timeout) func.apply(context, args);
};
};