UNPKG

svelte-tabs-scrollable

Version:

a simple svelte scrollable tabs with a lot of additional features and with fully supporting of RTL mode

19 lines (14 loc) 296 B
export const debounce = (func, wait = 166) => { let timeout; function debounced(...args) { const later = () => { func.apply(this, args); }; clearTimeout(timeout); timeout = setTimeout(later, wait); } debounced.clear = () => { clearTimeout(timeout); }; return debounced; };