Skip to content

Commit

Permalink
Merge pull request #1218 from ex1st/master
Browse files Browse the repository at this point in the history
Prevent arguments leak (compose)
  • Loading branch information
megawac authored Jul 6, 2016
2 parents 37eca1e + 48e0b01 commit 4a47e5d
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
8 changes: 3 additions & 5 deletions dist/async.js
Original file line number Diff line number Diff line change
Expand Up @@ -2404,8 +2404,6 @@
});
});

var reverse = Array.prototype.reverse;

/**
* Creates a function which is a composition of the passed asynchronous
* functions. Each function consumes the return value of the function that
Expand Down Expand Up @@ -2441,9 +2439,9 @@
* // result now equals 15
* });
*/
function compose() /* functions... */{
return seq.apply(null, reverse.call(arguments));
}
var compose = rest(function (args) {
return seq.apply(null, args.reverse());
});

function concat$1(eachfn, arr, fn, callback) {
var result = [];
Expand Down
Loading

0 comments on commit 4a47e5d

Please sign in to comment.