isArrayEqual()function

isArrayEqual(left: ImmutableArray, right: T, recursor: Match = isEqual): left is T
ParamType
leftImmutableArray
The array to check and narrow. required
rightT
The array to compare against. required
recursorMatch
Function that checks each item of the array.
- Defaults to isEqual() to check strict equality of the items.
- Use isDeepEqual() as the recursor to check to check deep equality of the items. Defaults to isEqual
Return
left is T
true if both arrays have the same length and matching items.

Are two arrays equal based on their items?

Examples

isArrayEqual([1, 2], [1, 2]) // true