Go to repository
Internal

Function mapEquals

Answer if two Maps are equal. Two Maps are equal when they both have the exact same number of keys, with same key names, and they have the same value in each key. To consider if two values of a key are equal the innerComparer is used. The expected value for innerComparer is the recursive comparer function in deepEquals.

Type Parameters

  • K
  • V

Parameters

  • a: Map<K, V>

    The first map

  • b: Map<K, V>

    The second map

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

    The function for testing if two inner elements are equal

      • (a, b): boolean
      • Parameters

        Returns boolean

Returns boolean

true if both Maps are equal, false otherwise.