equalsDeep
Recursive structural object equality.
Boolean wrapper around diff \u2014 returns true when the two values
are deeply equal according to the same rules. Use this when you only
need a yes/no answer; use diff when you also need to know
what differs.
For a one-level boolean check use equalsShallow.
Available since v2.0.0
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
objA | object | null | undefined | First value (object, `null`, or `undefined`). |
objB | object | null | undefined | Second value (object, `null`, or `undefined`). |
Returns
Section titled “Returns”boolean — true if both inputs are deeply equal, false otherwise.
Examples
Section titled “Examples”Compare nested objects
Section titled “Compare nested objects”Recursive structural equality. Returns true when the two values are deeply equal.
Detect deep differences
Section titled “Detect deep differences”Returns false when nested values differ.
