github
296 of 440 branches covered (67.27%)
Branch coverage included in aggregate %.
67 of 368 new or added lines in 5 files covered. (18.21%)
8912 existing lines in 125 files now uncovered.13683 of 29689 relevant lines covered (46.09%)
0.57 hits per line
1 |
// luma.gl
|
1✔ |
2 |
// SPDX-License-Identifier: MIT
|
1✔ |
3 |
// Copyright (c) vis.gl contributors
|
1✔ |
4 |
|
1✔ |
5 |
/** deeply compare two arrays */
|
1✔ |
6 |
export function deepArrayEqual(x: any, y: any): boolean {
|
|
UNCOV
7
|
if (x === y) {
|
× |
UNCOV
8
|
return true; |
× |
UNCOV
9
|
} |
× |
UNCOV
10
|
const isArrayX = Array.isArray(x) || ArrayBuffer.isView(x);
|
× |
UNCOV
11
|
const isArrayY = Array.isArray(y) || ArrayBuffer.isView(y);
|
× |
UNCOV
12
|
// @ts-expect-error TODO fix
|
× |
UNCOV
13
|
if (isArrayX && isArrayY && x.length === y.length) {
|
× |
UNCOV
14
|
// @ts-expect-error TODO fix
|
× |
UNCOV
15
|
for (let i = 0; i < x.length; ++i) { |
× |
UNCOV
16
|
if (x[i] !== y[i]) {
|
× |
UNCOV
17
|
return false; |
× |
UNCOV
18
|
} |
× |
UNCOV
19
|
} |
× |
UNCOV
20
|
return true; |
× |
UNCOV
21
|
} |
× |
UNCOV
22
|
return false; |
× |
UNCOV
23
|
} |
× |