Skip to main content
Module

x/funky/mod.ts

Getting funky with Deno!
Latest
import * as funky from "https://deno.land/x/funky@v0.3.2/mod.ts";

Variables

Creates a new ResultErr<T, E> instance, wrapping the specified @error.

Type-safe check whether @value is an array.

Checks whether the specified @array is empty. Returns true when there are no items in the @array.

Type-safe check whether the specified @array contains only elements of type T. The specified @checkType function is invoked on every item in the @array to determine whether it is of the expected type.

Type-safe check whether @result is of type ResultErr<T, E>.

Type-safe check whether @value is a Function.

Type-safe check whether @value is missing. @value is considered missing when it is either null or undefined.

Type-safe check whether @option is of type OptionNone<T>.

Type-safe check whether @value is null.

Type-safe check whether @value is a number.

Type-safe check whether @value is of type Object.

Type-safe check whether @result is of type ResultOk<T, E>.

Checks whether @value is one of the specified @options. Returns true when one of the @options is strictly equal to @value.

Type-safe check whether @value is of type Option<T>.

Checks whether @value is present. @value is considered present when it is neither null nor undefined.

Type-safe check whether @value is of type Result<T, E>.

Type-safe check whether @option is of type OptionSome<T>.

Type-safe check whether @value is a string.

Type-safe check whether @value is undefined.

Creates a new OptionNone<T> instance.

Creates a new ResultOk<T, E> instance, wrapping the specified @value.

Creates a new OptionSome<T> instance, wrapping the specified @value.

Interfaces

Represents a runtime-safe value which is optional. An optional value is a value which might or might not be present. The Option type allows you to write safe code around that value, without unexpected runtime exceptions.

Represents a runtime-safe result of an operation. The operation might be successful, in which case a Result instance wrapping the produced value of type T is returned. Otherwise, when the operation fails a Result instance wrapping the error of type E is returned.