UNPKG

356 BJavaScriptView Raw
1/**
2 * Compare two arrays with primitive values as the content.
3 * We need to make sure that both values and order match.
4 */
5export default function isArrayEqual(a, b) {
6 if (a === b) {
7 return true;
8 }
9
10 if (a.length !== b.length) {
11 return false;
12 }
13
14 return a.every((it, index) => it === b[index]);
15}
16//# sourceMappingURL=isArrayEqual.js.map
\No newline at end of file