Compare 2 array

@return true if each item equal
505770
public static boolean arraysEqual(Object[] array1, Object[] array2) {
		if (array1 == null || array1.length == 0 || array2 == null || array2.length == 0)
			DialectException.throwEX("StrUtils arraysEqual() method can not compare empty arrays");
		for (int i = 0; array1 != null && array2 != null && i < array1.length; i++)
			if (!array1[i].equals(array2[i]))
				return false;
		return true;
	}
803908
def compare_dicts(dict1, dict2):
    
    for k, v in dict2.items():
        if v != dict1[k]:
            return False
    return True
958383
function contains(array, value) {
  for (let i = 0; i < array.length; i++) {
    if (array[i] == value) { // non-strict equality check!
      return true;
    }
  }
  return false;
}
55764
function equalArray(array1, array2) {
      return (
        array1.length === array2.length &&
        array1.every(function(element, index) {
          return element === array2[index];
        })
      );
    }
93961
public static boolean startsWith(Object array1[], Object array2[]){
        return equals(array1, 0, array2, 0, array2.length);
    }
1130468
function(arr, comparator) {
			var lookup = [];
			return arr.filter(function(item) {
				var val = comparator ? comparator(item) : item;
				if (lookup.indexOf(val) < 0) {
					lookup.push(val);
					return true;
				}
			});
		}
53919
public static final <T> boolean contains(T[] array, T item)
    {
        for (T b : array)
        {
            if (b.equals(item))
            {
                return true;
            }
        }
        return false;
    }
290524
private function equals(array $set1, array $set2): bool
    {
        return array_diff($set1, $set2) == array_diff($set2, $set1);
    }
1331344
function ( array1, array2 ) {
		var a = array1.length > array2.length ? array1 : array2,
		    b = ( a === array1 ? array2 : array1 );

		return a.filter( function ( key ) {
			return array.contains( b, key );
		});
	}
865277
function arrayIndexOfComparer(array, item, comparer) {
    for (var i = 0, len = array.length; i < len; i++) {
      if (comparer(array[i], item)) { return i; }
    }
    return -1;
  }
403721
public static boolean equal(Object obj1, Object obj2) {
        if (obj1 == obj2) {
            return true;
        }
        if (obj1 == null || obj2 == null) {
            return false;
        }
        if (obj1.getClass().isArray()) {
            return equalsArray(obj1, obj2);
        }
        // this does not handle arrays embedded in objects, such as in lists/maps
        // but you shouldn't use arrays like that, should you?
        return obj1.equals(obj2);
    }
107471
def compare_arrays(left, right):
    ""
    return (
        left is right
        or ((left.shape == right.shape) and (left == right).all())
    )
163792
@Pure
	public static boolean propertyArraysEquals (Property<?>[] array, Property<?> [] array2) {
		if(array.length==array2.length) {
			for(int i=0; i<array.length; i++) {
				if(array[i]==null) {
					if(array2[i]!=null)
						return false;
				} else if(array2[i]==null) {
					return false;
				} else if(!array[i].getValue().equals(array2[i].getValue())) {
					return false;
				}
			}
			return true;
		}
		return false;
	}
305420
function compareArray(a1, a2) {
    if (a1.length != a2.length) return false;
    for (var i = 0; i < a1.length; i++) {
        if (a1[i] !== a2[i]) return false;
    }
    return true;
  }
1100135
public static function array_diff_multi($array1, $array2)
    {

        $res = array();
        foreach ($array1 as $entry) {
            if (!in_array($entry, $array2)) {
                $res[] = $entry;
            }
        }

        return $res;
    }
26588
@SuppressWarnings("unchecked")
  public <E> boolean isEqualsCollections(Collection<E> coll1, Collection<E> coll2, boolean isOrdered,
      ISrvIsEquals<E> srvIsEquals) {
    if((coll1 == null && coll2 != null) ||
        (coll1 != null && coll2 == null)) {
      return false;
    }
    if(coll1 != null && coll2 != null) {
      if(coll1.size() != coll2.size()) {
        return false;
      }
      if(isOrdered) {
        Object[] arr1 = coll1.toArray();
        Object[] arr2 = coll2.toArray();
        for(int i=0; i < coll1.size(); i++) {
          if(!srvIsEquals.getIsEquals((E)arr1[i], (E)arr2[i])) {
            return false;
          }
        }
      }
      else {
        outer:
        for(E e1 : coll1) {
          for(E e2 : coll2) {
            if(srvIsEquals.getIsEquals(e1, e2)) {
              continue outer;
            }
          }
          return false;
        }
      }
    }
    return true;  
  }
164596
function arrayEquals(arrayA, arrayB) {
	"use strict";

	// if the other array is a falsy value, return
	if (!arrayB || !arrayA) {
		return false;
	}

	// compare lengths - can save a lot of time
	if (arrayA.length !== arrayB.length) {
		return false;
	}

	for (var i = 0; i < arrayA.length; i++) {
		// Check if we have nested arrays
		if (arrayA[i] instanceof Array && arrayB[i] instanceof Array) {
			// recurse into the nested arrays
			if (!arrayEquals(arrayA[i], arrayB[i])) {
				return false;
			}
		}
		else if (arrayA[i] !== arrayB[i]) {
			// Warning - two different object instances will never be equal: {x:20} != {x:20}
			return false;
		}
	}
	return true;
}