Asserts that the target is not null and not undefined.
The assert scope.
OptionalevalMsg: MsgSource
The message to display if the assertion fails.
import { assert } from "@nevware21/tripwire";
assert(0).to.exist(); // Passes - 0 is not null or undefined
assert("").to.exist(); // Passes - empty string exists
assert(false).to.exist(); // Passes - false exists
assert(null).to.not.exist(); // Passes - null does not exist
assert(undefined).to.not.exist(); // Passes - undefined does not exist
Export assertion functions