UNPKG

454 BJavaScriptView Raw
1"use strict";
2
3Object.defineProperty(exports, "__esModule", {
4 value: true
5});
6exports.default = isArrayEqual;
7
8/**
9 * Compare two arrays with primitive values as the content.
10 * We need to make sure that both values and order match.
11 */
12function isArrayEqual(a, b) {
13 if (a === b) {
14 return true;
15 }
16
17 if (a.length !== b.length) {
18 return false;
19 }
20
21 return a.every((it, index) => it === b[index]);
22}
23//# sourceMappingURL=isArrayEqual.js.map
\No newline at end of file