Skip to main content
Module

x/better_iterators/mod.ts>LazyAsync#firstOr

Chainable iterators (sync and async) for TypeScript, with support for opt-in, bounded parallelism
Latest
method LazyAsync.prototype.firstOr
import { LazyAsync } from "https://deno.land/x/better_iterators@v1.5.0/mod.ts";

Get the first item. Returns defaultValue if there is no first item.

Parameters

defaultValue: D

Returns

Promise<T | D>