uni-ticket-system/node_modules/licia/before.js
2023-12-05 10:11:10 +08:00

11 lines
210 B
JavaScript

exports = function(n, fn) {
var memo;
return function() {
if (--n > 0) memo = fn.apply(this, arguments);
if (n <= 1) fn = null;
return memo;
};
};
module.exports = exports;