The default value.
The contained value or init
.
import { some, none, unwrapOr } from "./option.ts";
import { assertEquals } from "../deps.ts";
const unwrapOrBike = unwrapOr("bike");
assertEquals(unwrapOrBike(some("car")), "car");
assertEquals(unwrapOrBike(none()), "bike");
Generated using TypeDoc
Extracts the contained
Some
value orinit
.