npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bearz/assert

v0.1.0

Published

Bearz assertion library primarily for testing.

Downloads

40

Readme

@bearz/assert

Overview

The bearz/assert is now a remix of the std/assert library from Deno to enable modern asserts for Deno, Bun, and NodeJs; available as both npm and jsr packages.

The overall goal here is to make it easier to write javascript libaries that target multiple JavaScript runtimes.

logo

JSR npm version GitHub version

Documentation

Documentation is available on jsr.io

Usage

import { equal, ok, falsy } from "@bearz/assert";

// performs a deep equals
equal(1, 1);
ok(true);
fasly(false);

Classes

  • AssertionError the core assertion error.

Functions

  • arrayIncludes - asserts that an array includes values
  • assert - asserts that a value is truthy.
  • debug - logs a debug statement for tests. avoids polluting standard out unless debug is enabled.
  • setDebugTests - sets debugging for writing debug statements to true or false.
  • equal - asserts that values are deeply equal.
  • exists - asserts that a value exists.
  • fail - fails a test by throwing an AssertionError.
  • instanceOf - asserts that a value is an instance of a type.
  • nope - asserts that a value is falsy.
  • notOk - asserts that a value is falsy.
  • notEqual - asserts that two values are not deeply equal.
  • notInstanceOf - asserts that a value is not an instance of a type.
  • notStrictEqual - asserts that two values are not strictly equal (not the same ref).
  • ok - asserts that a value is truthy.
  • rejects - asserts that promise returns a rejection.
  • strictEqual - asserts that two values are strictly equal (same ref).
  • stringIncludes - asserts that a string includes a value.
  • throws - asserts that a function throws an exception.
  • truthy - asserts that a value is truthy.
  • unimplemented - asserts that a test is not yet implemented.

TODO

  • [x] Remove dependency on chai

Notes

This module is now a remix of the std/assert library from deno to enable modern asserts for Deno, Bun, and NodeJs; available as both npm and jsr packages.

The @bearz/testing and @bearz/assert modules can be used together to reduce the amount of shims and cruft when using denoland/dnt to publish jsr and npm modules.

The methods are renamed to enable importing all asserts as a single assert object. To demonstrate:

import * as assert from "@bearz/assert"

assert.ok()

If the @std lib deno packages or something similar were available as official npm and jsr packages, this package would not exist. It's only here to reduce the friction of writing cross runtime libraries.

License

MIT License

The majority of the code is now from std/assert which is under the MIT license. https://jsr.io/@std/assert/1.0.6/LICENSE