mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 15:57:48 +00:00
Cleanup _.compose.
This commit is contained in:
@@ -4665,17 +4665,14 @@
|
||||
*/
|
||||
function compose() {
|
||||
var funcs = arguments,
|
||||
length = funcs.length;
|
||||
funcsLength = funcs.length,
|
||||
length = funcsLength;
|
||||
|
||||
while (length--) {
|
||||
if (!isFunction(funcs[length])) {
|
||||
throw new TypeError;
|
||||
}
|
||||
}
|
||||
var funcsLength = funcs.length;
|
||||
if (funcsLength === 1) {
|
||||
return funcs[0];
|
||||
}
|
||||
return function() {
|
||||
var length = funcsLength - 1,
|
||||
result = funcs[length].apply(this, arguments);
|
||||
|
||||
Reference in New Issue
Block a user