main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
588 bytes
|
Line | |
---|
1 | import 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 | */
|
---|
24 | var flowRight = createFlow(true);
|
---|
25 |
|
---|
26 | export default flowRight;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.