import isNil from "lodash.isnil";
import isEqual from "lodash.isequal";
/**
 * Returns `true` if the arrays are equal
 *
 * ```typescript
 * areArraysEqual(['a', 'b'], ['b', 'a']) // true
 * ```
 */
export function areArraysEqual(a, b) {
    if (isNil(a) || isNil(b)) {
        return false;
    }
    const copyA = [...a].sort();
    const copyB = [...b].sort();
    return isEqual(copyA, copyB);
}
