Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/proc/mod3.ts>Enumerable#find

A better way to work with processes in Deno.
Go to Latest
method Enumerable.prototype.find
Re-export
import { Enumerable } from "https://deno.land/x/proc@0.20.43/mod3.ts";

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

Parameters

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

The testing function.

Returns

Promise<T | undefined>

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