UNPKG

625 BJavaScriptView Raw
1import createFlow from './_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] Functions to invoke.
13 * @returns {Function} Returns the new function.
14 * @example
15 *
16 * function square(n) {
17 * return n * n;
18 * }
19 *
20 * var addSquare = _.flow(_.add, square);
21 * addSquare(1, 2);
22 * // => 9
23 */
24var flow = createFlow();
25
26export default flow;