Skip to main content
Module

x/lodash_es/mod.ts>tap

lodash for deno use
Latest
function tap
import { tap } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

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.

Examples

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

Parameters

value

The value to provide to interceptor.

interceptor

The function to invoke.