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

x/libpkgx/src/utils/misc.ts>flatmap

`import`… but with pkging powers
Very Popular
Go to Latest
function flatmap
import { flatmap } from "https://deno.land/x/libpkgx@v0.19/src/utils/misc.ts";

Parameters

t: T | Falsy
body: (t: T) => S | Falsy
optional
opts: { rescue: boolean; }

Returns

S | undefined

Parameters

t: Promise<T | Falsy>
body: (t: T) => Promise<S | Falsy>
optional
opts: { rescue: boolean; }

Returns

Promise<S | undefined>