expo-router
Version:
Expo Router is a file-based router for React Native and web applications.
24 lines (22 loc) • 515 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
Object.defineProperty(exports, "throttle", {
enumerable: true,
get: function() {
return throttle;
}
});
function throttle(func, duration) {
let timeout;
return function(...args) {
if (timeout == null) {
func.apply(this, args);
timeout = setTimeout(()=>{
timeout = undefined;
}, duration);
}
};
}
//# sourceMappingURL=throttle.js.map