Go to repository
Internal

Function arrayEquals

Answer if two arrays are equal. Two arrays are equal when they both have the exact same number of elements, and they have the same element in each position. To consider if two elements inside the array are equal the innerComparer is used. The expected value for innerComparer is the recursive comparer function in deepEquals.

Type Parameters

  • T

Parameters

  • aArr: T[]

    The first array

  • bArr: T[]

    The second array

  • innerComparer: ((a: T, b: T) => boolean)

    The function for testing if two inner elements are equal

      • (a, b): boolean
      • Parameters

        Returns boolean

Returns boolean

true if both arrays are equal, false otherwise.