Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/proc/src/enumerable.ts>Enumerable#find

A better way to work with processes in Deno.
Very Popular
Go to Latest
method Enumerable.prototype.find
import { Enumerable } from "https://deno.land/x/proc@0.21.0/src/enumerable.ts";

Return the first element that satisfies the provided testing function, or undefined if no value satisfies the testing function.

Parameters

findFn: (element: T) => unknown | Promise<unknown>

The testing function.

Returns

Promise<T | undefined>

The first item that satisfies the testing function, or undefined.