Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

A better way to work with processes in Deno.
Latest
method Enumerable.prototype.find
import { Enumerable } from "https://deno.land/x/proc@0.22.1/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.