@nevware21/tripwire - v0.1.2
    Preparing search index...

    Variable assert

    assert: IAssertClass = ...

    A singleton instance of the IAssertClass interface that can be used to perform various assertions, the functions check the provided expression and throw an AssertionFailure if the expression is false.

    The assert contains a number of functions that can be used to perform various assertions, like checking if a value is true, false, null, undefined, empty, equal, strictly equal, deep equal, etc.

    The assert object is also a function that can be called directly with the following parameters:

    The expression to evaluate.

    The message to display if the assertion fails. This can be a string or a function that returns a string.

    AssertionFailure - If the expression is false.

    import { assert } from "@nevware21/tripwire";

    assert(1 === 1);
    assert(true, "This is true");
    assert(false, "This is false");
    assert.equal(1, 1);
    assert.isTrue(true);
    assert.isFalse(false);
    assert.isNull(null);
    assert.isUndefined(undefined);
    assert.isEmpty([]);

    0.1.0