Skip to main content

@std/assert@1.0.11
Built and signed on GitHub Actions

Common assertion functions, especially useful for testing

This package works with Cloudflare Workers, Node.js, Deno, Bun, Browsers
This package works with Cloudflare Workers
This package works with Node.js
This package works with Deno
This package works with Bun
This package works with Browsers
JSR Score
100%
Published
3 weeks ago (1.0.11)

Functions

f
assertExists

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

Add Package

deno add jsr:@std/assert

Import symbol

import * as mod from "@std/assert/exists";

---- OR ----

Import directly with a jsr specifier

import * as mod from "jsr:@std/assert/exists";

Add Package

npx jsr add @std/assert

Import symbol

import * as mod from "@std/assert/exists";

Add Package

yarn dlx jsr add @std/assert

Import symbol

import * as mod from "@std/assert/exists";

Add Package

pnpm dlx jsr add @std/assert

Import symbol

import * as mod from "@std/assert/exists";

Add Package

bunx jsr add @std/assert

Import symbol

import * as mod from "@std/assert/exists";