• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

visgl / luma.gl / 14683349798

26 Apr 2025 05:08PM UTC coverage: 74.055% (-0.9%) from 74.913%
14683349798

push

github

web-flow
feat(core): TextureFormat generics (#2377)

2019 of 2652 branches covered (76.13%)

Branch coverage included in aggregate %.

62 of 262 new or added lines in 15 files covered. (23.66%)

196 existing lines in 9 files now uncovered.

26575 of 35960 relevant lines covered (73.9%)

47.35 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

62.5
/modules/core/src/utils/array-equal.ts
1
// luma.gl
1✔
2
// SPDX-License-Identifier: MIT
1✔
3
// Copyright (c) vis.gl contributors
1✔
4

1✔
5
import {isNumberArray} from './is-array';
1✔
6

1✔
7
/** Test if two arrays are deep equal, with a length limit that defaults to 16 */
1✔
8
export function arrayEqual(a: unknown, b: unknown, limit: number = 16) {
1✔
9
  if (a !== b) {
51✔
10
    return false;
51✔
11
  }
51!
UNCOV
12
  const arrayA = a;
×
UNCOV
13
  const arrayB = b;
×
UNCOV
14
  if (!isNumberArray(arrayA)) {
×
UNCOV
15
    return false;
×
UNCOV
16
  }
×
17
  if (isNumberArray(arrayB) && arrayA.length === arrayB.length) {
51!
18
    for (let i = 0; i < arrayA.length; ++i) {
×
19
      if (arrayB[i] !== arrayA[i]) {
×
20
        return false;
×
21
      }
×
22
    }
×
23
  }
×
24
  return true;
×
25
}
×
26

1✔
27
/** Copy a value */
1✔
28
export function arrayCopy<T>(a: T): T {
1✔
29
  if (isNumberArray(a)) {
51✔
30
    return a.slice() as T;
39✔
31
  }
39✔
32
  return a;
12✔
33
}
12✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc