_.flowRight

_.flowRight([funcs])

This method is like _.flow except that it creates a function that invokes the given functions from right to left.

Since

3.0.0

Arguments

  1. [funcs] (...(Function|Function[])): The functions to invoke.

Returns

(Function): Returns the new composite function.

Example

function square(n) {
  return n * n;
}
 

var addSquare = _.flowRight([square, _.add]);

addSquare(1, 2);
// => 9
doc_Lodash
2016-11-27 16:37:13
Comments
Leave a Comment

Please login to continue.