UNPKG

quasar-framework

Version:

Build responsive SPA, SSR, PWA, Hybrid Mobile Apps and Electron apps, all simultaneously using the same codebase

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 } }