Skip to content

deepCompare⚓︎

deepCompare
Deeply compares two array elements.

ts function deepCompare(lhs, rhs): numberDeeply compares two array elements.

Parameters⚓︎

Parameter Type Description
lhs object Left object to compare.
rhs object Right object to compare.

Returns⚓︎

number

1 if lhs is greater than rhs; -1 if lhs is less than rhs; 0 if lhs and rhs are equal.