import { promise } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { catchError } = promise;
An alias for Promise.catch
Examples
Example 1
Example 1
import { reject, catchError } from "./promise.ts";
import { pipe } from "./fn.ts";
const result = await pipe(
reject(1),
catchError(() => "Uhoh"),
); // "UhOh"
Parameters
fua: (u: unknown) => A