Skip to content

Commit

Permalink
Update underscore.catenate.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusmaso committed May 10, 2014
1 parent 4586dd1 commit 998aab8
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions lib/underscore.catenate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@

_.catenate = function() {
var methods = arguments;

return function() {
var result;
var output;
var context = this;
var args = arguments;
var catenateArguments = arguments;

_.each(methods, function(method) {
if (method)
result = method.apply(context, args);
if (method) output = method.apply(context, catenateArguments);
});
return result;

return output;
};
};

})(_);
})(_);

0 comments on commit 998aab8

Please sign in to comment.