@tempots/std
areArraysEqual() function
Checks if two arrays are equal based on a custom equality function.
Signature:
areArraysEqual: (a: T[], b: T[], equality: (a: T, b: T) => boolean) => boolean
Parameters
Parameter |
Type |
Description |
---|---|---|
a |
T[] |
The first array. |
b |
T[] |
The second array. |
equality |
(a: T, b: T) => boolean |
The custom equality function to compare elements. |
Returns: boolean
Returns true
if the arrays are equal, false
otherwise.