Skip to main content
Deno 2 is finally here 🎉️
Learn more
Latest
function matches.guard
Re-export
import { matches } from "https://deno.land/x/embassyd_sdk@v0.3.4.3.0-alpha1/lib/esm/mod.js";
const { guard } = matches;

Create a custom type guard

Parameters

test

A function that will determine runtime if the value matches

testName

A name for that function, useful when it fails