ctrl + k
On This Page
Functions
Equality Utilities
The Equality utilities provide functions for comparing values and objects in JavaScript. These functions offer more comprehensive equality checks than the built-in equality operators, particularly for complex data structures.
Functions
isEqual
Performs a deep equality comparison between two values.
Deep Comparison This function performs a recursive comparison for objects and arrays, ensuring that nested structures are also checked for equality. It handles various edge cases, including
NaN
comparisons.
Parameters
Name | Type | Description |
---|---|---|
a | any | The first value to compare |
b | any | The second value to compare |
Returns
boolean
- true
if the values are deeply equal, false
otherwise.