Skip to content

Commit 379b7a0

Browse files
bjarneojdalton
authored andcommitted
Minor cleanup to createFlow. [closes lodash#2925]
1 parent 34ca4f3 commit 379b7a0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.internal/createFlow.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@ function createFlow(fromRight) {
99
return (...funcs) => {
1010
const length = funcs.length;
1111

12-
let func;
13-
let wrapper;
1412
let index = length;
1513

1614
if (fromRight) {
1715
funcs.reverse();
1816
}
17+
1918
while (index--) {
20-
func = funcs[index];
21-
if (typeof func != 'function') {
19+
if (typeof funcs[index] !== 'function') {
2220
throw new TypeError('Expected a function');
2321
}
2422
}
23+
2524
return function(...args) {
2625
const value = args[0];
2726
let index = 0;
@@ -30,6 +29,7 @@ function createFlow(fromRight) {
3029
while (++index < length) {
3130
result = funcs[index].call(this, result);
3231
}
32+
3333
return result;
3434
};
3535
};

0 commit comments

Comments
 (0)