Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
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.21.3/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) => unknown | Promise<unknown>

The testing function.

Returns

Promise<T | undefined>

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