UNPKG

@usj/vue-components

Version:

VueJS components used internally by USJ

17 lines (13 loc) 241 B
const debounce = (callback, limit) => { var wait = false return () => { if (!wait) { callback.call() wait = true window.setTimeout(() => { wait = false }, limit) } } } export default debounce