_.barrier -> _.after, switch the order of arguments ... fix test formatting.

This commit is contained in:
Jeremy Ashkenas
2011-04-15 16:17:58 -04:00
parent c7b47edd2f
commit 8f67aa3f18
2 changed files with 14 additions and 17 deletions

View File

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