| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | var createFlow = require('./_createFlow'); |
| 2 | |
| 3 | /** |
| 4 | * Creates a function that returns the result of invoking the given functions |
| 5 | * with the `this` binding of the created function, where each successive |
| 6 | * invocation is supplied the return value of the previous. |
| 7 | * |
| 8 | * @static |
| 9 | * @memberOf _ |
| 10 | * @since 3.0.0 |
| 11 | * @category Util |
| 12 | * @param {...(Function|Function[])} [funcs] The functions to invoke. |
| 13 | * @returns {Function} Returns the new composite function. |
| 14 | * @see _.flowRight |
| 15 | * @example |
| 16 | * |
| 17 | * function square(n) { |
| 18 | * return n * n; |
| 19 | * } |
| 20 | * |
| 21 | * var addSquare = _.flow([_.add, square]); |
| 22 | * addSquare(1, 2); |
| 23 | * // => 9 |
| 24 | */ |
| 25 | var flow = createFlow(); |
| 26 | |
| 27 | module.exports = flow; |