import { i as isNil } from './index2.js';
import { i as isEqual } from './index5.js';

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

export { areArraysEqual as a };
