equals(otherBuffer) {
    if (!(otherBuffer instanceof Uint8Array)) {
      throw new TypeError(
        `The "otherBuffer" argument must be an instance of Buffer or Uint8Array. Received type ${typeof otherBuffer}`,
      );
    }
    if (this === otherBuffer) return true;
    if (this.byteLength !== otherBuffer.byteLength) return false;
    for (let i = 0; i < this.length; i++) {
      if (this[i] !== otherBuffer[i]) return false;
    }
    return true;
  }
/*
   * Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise.
   */
Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise.
Returns true if both buf and otherBuffer have exactly the same bytes false otherwise .
equals(otherBuffer) {
    if (!(otherBuffer instanceof Uint8Array)) {
      throw new TypeError(
        `The "otherBuffer" argument must be an instance of Buffer or Uint8Array. Received type ${typeof otherBuffer}`,
      );
    }
    if (this === otherBuffer) return true;
    if (this.byteLength !== otherBuffer.byteLength) return false;
    for (let i = 0; i < this.length; i++) {
      if (this[i] !== otherBuffer[i]) return false;
    }
    return true;
  }
equals ( otherBuffer ) { if ( ! ( otherBuffer instanceof Uint8Array ) ) { throw new TypeError ( ` ${ typeof otherBuffer } ` , ) ; } if ( this === otherBuffer ) return true ; if ( this . byteLength !== otherBuffer . byteLength ) return false ; for ( let i = 0 ; i < this . length ; i ++ ) { if ( this [ i ] !== otherBuffer [ i ] ) return false ; } return true ; }
Returns true if both buf and otherBuffer have exactly the same bytes, false otherwise.
Returns true if both buf and otherBuffer have exactly the same bytes false otherwise .