• Returns true if assertion passes and false if it throws.

    Type Parameters

    • $Value

    Parameters

    • assertion: $Value

      Assertion to be checked.

    • value: unknown

      Value to be passed into assertion.

    Returns value is $Value

    is(number, 1); // true
    is(number, "nope"); // false