import { O } from "https://deno.land/x/ahh@v0.10.0/src/option/mod.ts";
Returns opt
if it is a Some
, or returns
default_
.
Examples
import { O, None } from "./mod.ts";
console.log(O.unwrapOr(1, 2)); // 1
console.log(O.unwrapOr(None, 2)); // 2