/var/www/greso.tech/server/nsm/node_modules/underscore/cjs
Edit: /var/www/greso.tech/server/nsm/node_modules/underscore/cjs/before.js (311B)
// Returns a function that will only be executed up to (but not including) the
// Nth call.
function before(times, func) {
var memo;
return function() {
if (--times > 0) {
memo = func.apply(this, arguments);
}
if (times <= 1) func = null;
return memo;
};
}
module.exports = before;