_.flowRight
语法:
_.flowRight([funcs])
源代码链接:source
npm包链接:npm package
描述:
这个方法类似_.flow
,除了它调用函数的顺序是从右往左的。
开始版本:3.0.0
参数:
[funcs] (...(Function|Function[]))
: 要调用的函数。
返回值:
(Function)
: 返回新的函数。
例子:
function square(n) {
return n * n;
}
var addSquare = _.flowRight([square, _.add]);
addSquare(1, 2);
// => 9
Last updated
Was this helpful?