Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/ahh/src/option/mod.ts

Opinionated idiomatic type-safety functions.
Go to Latest
import * as ahh from "https://deno.land/x/ahh@v0.11.0/src/option/mod.ts";

Functions

Return other if opt is Some, or None.

Returns whether opt strictly equals value, or false if it is a None.

Calls f with opt, and returns it if the result is true.

Calls f with opt, and returns the original opt.

Returns whether opt is a None.

Returns whether opt is a Some.

Calls f with opt, and returns the result.

Converts opt into an Ok if it is a Some.

Return opt if it is a Some, or other.

Returns opt if it is a Some, or throws.

Returns opt if it is a Some, or returns default_.

Type Aliases

Represents an Option that does not exist.

Represents an optional value that either exists (Some) or does not exist (None).

Represents an Option that does exist.