Skip to main content
Module

x/unknownutil/ensure.ts

🦕 An utility pack for handling unknown type in deno
Go to Latest
import * as unknownutil from "https://deno.land/x/unknownutil@v2.0.0/ensure.ts";

Functions

Return x as-is if x is array or raise an EnsureError when it's not.

Return x as-is if x is boolean or raise an EnsureError when it's not.

Return x as-is if x is function or raise an EnsureError when it's not.

Return x as-is if x follows the reference or raise an EnsureError when it doesn't.

Return x as-is if x is null or raise an EnsureError when it's not.

Return x as-is if x is null or undefined or raise an EnsureError when it's not.

Return x as-is if x is number or raise an EnsureError when it's not.

Return x as-is if x is object or raise an EnsureError when it's not.

Return x as-is if x is string or raise an EnsureError when it's not.

Return x as-is if x is undefined or raise an EnsureError when it's not.