import { maybe } from "https://deno.land/x/unknownutil@v3.18.1/mod.ts";
Returns the input value if it satisfies the provided predicate, or undefined
otherwise.
import { is, maybe } from "@core/unknownutil";
const a: unknown = "hello";
const _: string = maybe(a, is.String) ?? "default value";