UNPKG

quasar

Version:

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

14 lines (11 loc) 272 B
export default function (fn, limit = 250) { let wait = false, result return function (/* ...args */) { if (wait === false) { wait = true setTimeout(() => { wait = false }, limit) result = fn.apply(this, arguments) } return result } }