2025-07-29 15:39:33 +08:00

16 lines
343 B
JavaScript

"use strict";
const throttle = function(fn, wait = 1e3) {
var flag = true;
return function() {
if (flag) {
fn.apply(this, arguments);
flag = false;
setTimeout(() => {
flag = true;
}, wait);
}
};
};
exports.throttle = throttle;
//# sourceMappingURL=../../.sourcemap/mp-weixin/utils/throttle.js.map