b773405f6a9b6bcc8f3350d148cc0420a1f651e8
[yaffs-website] / node_modules / grunt-legacy-util / node_modules / lodash / flow.js
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  * @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 = _.flow(_.add, square);
20  * addSquare(1, 2);
21  * // => 9
22  */
23 var flow = createFlow();
24
25 module.exports = flow;