UNPKG

554 BJavaScriptView Raw
1import createFlow from './_createFlow';
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 0.1.0
9 * @memberOf _
10 * @category Util
11 * @param {...(Function|Function[])} [funcs] Functions to invoke.
12 * @returns {Function} Returns the new function.
13 * @example
14 *
15 * function square(n) {
16 * return n * n;
17 * }
18 *
19 * var addSquare = _.flowRight(square, _.add);
20 * addSquare(1, 2);
21 * // => 9
22 */
23var flowRight = createFlow(true);
24
25export default flowRight;