isEqual es-toolkit
Performs a deep comparison to check if two values are equal.
Usage
isEqual(a, b)
Use isEqual when you want to check if two values are deeply equal, including objects, arrays, Date, RegExp, etc. Returns true if the contents are the same even if the references are different. Useful for unit testing and data comparison.
Supports deep comparison of objects and arrays.
Can also compare objects like Date, RegExp, Map, Set.
Frequently used in unit testing.
Parameters
The first value to compare.
The second value to compare.
Returns
Returns true if the two values are deeply equal, false otherwise.
Source: es-toolkit
Re-exported verbatim from es-toolkit. Implementation, edge cases, and performance behavior are owned upstream. This page mirrors the documentation at the pinned version; the linked source is authoritative.