UNPKG

quasar

Version:

Build high-performance VueJS user interfaces (SPA, PWA, SSR, Mobile and Desktop) in record time

18 lines (15 loc) 280 B
export default function (fn, limit = 250) { let wait = false let result return function (...args) { if (wait) { return result } wait = true result = fn.apply(this, args) setTimeout(() => { wait = false }, limit) return result } }