UNPKG

588 BJavaScriptView Raw
1import createFlow from './_createFlow.js';
2
3/**
4 * This method is like `_.flow` except that it creates a function that
5 * invokes the given functions from right to left.
6 *
7 * @static
8 * @since 3.0.0
9 * @memberOf _
10 * @category Util
11 * @param {...(Function|Function[])} [funcs] The functions to invoke.
12 * @returns {Function} Returns the new composite function.
13 * @see _.flow
14 * @example
15 *
16 * function square(n) {
17 * return n * n;
18 * }
19 *
20 * var addSquare = _.flowRight([square, _.add]);
21 * addSquare(1, 2);
22 * // => 9
23 */
24var flowRight = createFlow(true);
25
26export default flowRight;