Skip to main content
Module

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

bringing the entire open source ecosystem to your node and deno apps
Very Popular
Go to Latest
function flatmap
import { flatmap } from "https://deno.land/x/libpkgx@v0.15.1/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>