API reference@evolu/commonEq › eqArraySameValue

const eqArraySameValue: <A>(x: ArrayLike, y: ArrayLike) => boolean;

Defined in: packages/common/src/Eq.ts:170

Compares two array-like structures element by element using eqSameValue.

Useful for structural sharing checks where objects are compared by reference identity. NaN elements are equal, while 0 and -0 elements differ.

Example

import { assertFalse, assertTrue, eqArraySameValue } from "@evolu/common";

const a = { x: 1 };
const b = { x: 1 };
assertTrue(eqArraySameValue([a, a], [a, a]));
assertFalse(eqArraySameValue([a], [b]));