Current File : /home/exataengenharia/public_html/node_modules/alpinejs/src/utils/throttle.js
export function throttle(func, limit) {
    let inThrottle

    return function() {
        let context = this, args = arguments

        if (! inThrottle) {
            func.apply(context, args)

            inThrottle = true

            setTimeout(() => inThrottle = false, limit)
        }
    }
}