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