tap

Seq
since 0.1.0

Arguments

  • * The value to provide to `interceptor`.
  • Function The function to invoke.

Returns

* `value`.

This method invokes interceptor and returns value. The interceptor is invoked with one argument; (value). The purpose of this method is to "tap into" a method chain sequence in order to modify intermediate results.

Example of Lodash _.tap

_([1, 2, 3])
 .tap(function(array) {
   // Mutate input array.
   array.pop();
 })
 .reverse()
 .value();
// => [2, 1]