deepEqual

Commons
stable

Recursively compares two values for structural equality. Handles primitives, Date objects, and plain objects. Returns true when both values have identical structure and content.

API

Signature

Full TypeScript signature sourced from the util file.

typescript

API

Parameters

Input parameters accepted by this util.

a
required
any
The first value to compare.
b
required
any
The second value to compare.

API

Return value

The value returned by this util.

true when both values are structurally equal, false otherwise.

Usage

Examples

Ready-to-paste usage snippets.

Comparing objects and dates

typescript