Utility class for validating objects.

Constructors

Methods

  • Checks if the length of a Uint8Array is at least a specified length. Throws an error if the length is less than the specified length.

    Parameters

    • arr: Uint8Array
    • len: number
    • Optionalmessage: string

    Returns void

  • Checks if the length of a Uint8Array equals a specified length and throws an error if the lengths do not match.

    Parameters

    • arr: Uint8Array
    • len: number
    • Optionalmessage: string

    Returns void

  • Compares two Uint8Arrays for equality and throws an error if they are not equal.

    Parameters

    • arr: Uint8Array
    • b: Uint8Array
    • Optionalmessage: string

    Returns void