michaelficarra's proposed tweak to _.after

This commit is contained in:
Jeremy Ashkenas
2011-04-15 18:01:53 -04:00
parent ea44179d81
commit 6f25ccae31

View File

@@ -512,7 +512,7 @@
// Returns a function that will only be executed after being called N times.
_.after = function(times, func) {
return function() {
if (--times === 0) { return func.apply(this, arguments); }
if (--times < 1) { return func.apply(this, arguments); }
};
};