The first array-like object to compare.
The second array-like object to compare.
Optional
fn: ((a, b) => boolean)The comparison function to apply to the elements. It
should return true
if the elements are "equal". The default
compares elements using strict ===
equality.
Whether the two arrays are shallowly equal.
Linear.
Modifying the length of the arrays while comparing.
import { ArrayExt } from '@lumino/algorithm';
let d1 = [0, 3, 4, 7, 7, 9];
let d2 = [0, 3, 4, 7, 7, 9];
let d3 = [42];
ArrayExt.shallowEqual(d1, d2); // true
ArrayExt.shallowEqual(d2, d3); // false
Test whether two arrays are shallowly equal.