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

x/html_parser/src/deps.ts>assertions.assertExists

Port of fb55/htmlparser2 for Deno
Latest
function assertions.assertExists
import { assertions } from "https://deno.land/x/html_parser@v0.1.3/src/deps.ts";
const { assertExists } = assertions;

Make an assertion that actual is not null or undefined. If not then throw.

Parameters

actual: T
optional
msg: string

Returns

asserts actual is NonNullable<T>