ixfx
    Preparing search index...

    Function isEqual

    • Returns true if the two arrays have the same items at same indexes. Use isEqualDefault to compare values regardless of position.

      Returns false if arrays are of different length. By default uses === semantics for equality checking.

      isEqual([ 1, 2, 3], [ 1, 2, 3 ]); // true
      isEqual([ 1, 2, 3], [ 3, 2, 1 ]); // false

      Compare by value

      isEqual(a, b, isEqualValueDefault);
      

      Custom compare, eg based on name field:

      isEqual(a, b, (compareA, compareB) => compareA.name === compareB.name);
      

      Type Parameters

      • V

      Parameters

      • arrayA: V[]
      • arrayB: V[]
      • eq: (a: V, b: V) => boolean = ...
          • (a: V, b: V): boolean
          • Default comparer function is equiv to checking a === b. Use isEqualValueDefault to compare by value, via comparing JSON string representation.

            Parameters

            Returns boolean

      Returns boolean