@cowwoc/requirements - v4.0.12
    Preparing search index...
    • Validates the state of a set.

      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 extends undefined | null | Set<E>

        the type the value

      • E

        the type elements in the set

      Parameters

      • value: T

        the value

      • name: string

        the name of the value

      Returns SetValidator<T, E>

      validator for the value

      TypeError if name is undefined or null

      RangeError if name is empty