Files
web-apps/vendor/underscore/modules/after.js
2024-03-06 21:54:19 +05:00

9 lines
221 B
JavaScript

// Returns a function that will only be executed on and after the Nth call.
export default function after(times, func) {
return function() {
if (--times < 1) {
return func.apply(this, arguments);
}
};
}