Skip to main content
Home

A universal testing module that works seamlessly across Deno, Node.js, and Bun runtimes. Write tests once, run them anywhere - from mobile to desktop, and 3D/spatial environments!

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
58%
Published
3 months ago (0.7.1)
type alias AssertFalsyProp

Values that JavaScript considers as "false-like". These are: false, 0, "", null, undefined

Example:

import { AssertFalsyProp } from '@in/test';

function checkIfEmpty(value: AssertFalsyProp) {
  if (!value) {
    console.log("Value is empty or false-like");
  }
}

checkIfEmpty("");        // Works
checkIfEmpty(0);        // Works
checkIfEmpty(false);    // Works
checkIfEmpty(null);     // Works
checkIfEmpty(undefined);// Works

Definition

false
| 0
| 0
| ""
| null
| undefined

New Ticket: Report package

Please provide a reason for reporting this package. We will review your report and take appropriate action.

Please review the JSR usage policy before submitting a report.

Add Package

deno add jsr:@in/test

Import symbol

import { type AssertFalsyProp } from "@in/test/assert";
or

Import directly with a jsr specifier

import { type AssertFalsyProp } from "jsr:@in/test/assert";

Add Package

pnpm i jsr:@in/test
or (using pnpm 10.8 or older)
pnpm dlx jsr add @in/test

Import symbol

import { type AssertFalsyProp } from "@in/test/assert";

Add Package

yarn add jsr:@in/test
or (using Yarn 4.8 or older)
yarn dlx jsr add @in/test

Import symbol

import { type AssertFalsyProp } from "@in/test/assert";

Add Package

vlt install jsr:@in/test

Import symbol

import { type AssertFalsyProp } from "@in/test/assert";

Add Package

npx jsr add @in/test

Import symbol

import { type AssertFalsyProp } from "@in/test/assert";

Add Package

bunx jsr add @in/test

Import symbol

import { type AssertFalsyProp } from "@in/test/assert";