UNPKG

@sorens/artist-svelte

Version:

an opinionated and clean UI framework for SvelteKit with theme support built-in

18 lines (17 loc) 327 B
/** * * * */ export default function (callback, delay = 100, scope = null) { let wait = false; return (...args) => { if (!wait) { callback.call(scope, ...args); wait = true; setTimeout(function () { wait = false; }, delay); } }; }