Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/optio/operators/logical.ts

Minimum option type port of Rust
Latest
import * as optio from "https://deno.land/x/optio@1.0.0/operators/logical.ts";

Functions

Returns None if the option is None, otherwise returns optb.

Returns None if the option is None, otherwise calls fn with the wrapped value and returns the result.

Returns the option if it contains a value, otherwise returns obtb.

Returns the option if it Some, otherwise calls fn and returns the result.

Returns Some if exactly one of option, optb is Some, otherwise returns None.