@cowwoc/requirements - v4.0.12
    Preparing search index...
    • Validates the state of an unknown value or a value that does not have a specialized validator.

      The returned validator throws an exception immediately if a validation fails. This exception is then converted into an AssertionError. Exceptions unrelated to validation failures are not converted.

      Type Parameters

      • T

        the type the value

      Parameters

      • value: T

        the value

      • name: string

        the name of the value

      Returns UnknownValidator<T>

      validator for the value

      TypeError if name is undefined or null

      RangeError if name is empty