"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.areArraysDifferent = exports.makeUnique = void 0;
/**
 * Returns a unique array of strings from the given array
 * @param items The array of strings to make unique
 * @since 0.13
 */
function makeUnique(arr) {
    var a = [];
    for (var i = 0, l = arr.length; i < l; i++) {
        if (a.indexOf(arr[i]) === -1 && arr[i] !== '')
            a.push(arr[i]);
    }
    return a;
}
exports.makeUnique = makeUnique;
/**
 * Indicates if the given arrays are different (content-wise)
 * @param arr
 * @param other
 * @since 0.13
 */
function areArraysDifferent(arr, other, equalityFn) {
    if (arr && other) {
        if (arr.length != other.length) {
            return true;
        }
        else {
            for (var i = 0; i < arr.length; i++) {
                if (equalityFn) {
                    if (!equalityFn(arr[i], other[i])) {
                        return true;
                    }
                }
                else if (arr[i] !== other[i]) {
                    return true;
                }
            }
            return false;
        }
    }
    else {
        return true;
    }
}
exports.areArraysDifferent = areArraysDifferent;
//# sourceMappingURL=array.js.map