Skip to main content
Module

x/lodash_es/mod.ts>thru

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

This method is like _.tap except that it returns the result of interceptor. The purpose of this method is to "pass thru" values replacing intermediate results in a method chain sequence.

Examples

_(' abc ') .chain() .trim() .thru(function(value) { return [value]; }) .value(); // => ['abc']

Parameters

value

The value to provide to interceptor.

interceptor

The function to invoke.