Skip to content

@technobuddha > library > Object > Comparison

Function: deepEquals()

ts
function deepEquals(
   objA: 
  | undefined
  | null
  | Record<string, unknown>, 
   objB: 
  | undefined
  | null
  | Record<string, unknown>, 
   exclude: string[]): boolean;

Defined in: deep-equals.ts:17

Compare two object for equality.

WARNING

Circular references are not handled, resulting in infinite recursion.

Parameters

ParameterTypeDefault valueDescription
objA| undefined | null | Record<string, unknown>undefinedFirst object to compare
objB| undefined | null | Record<string, unknown>undefinedSecond object to compare
excludestring[][]Array of key names to exclude from the comparison

Returns

boolean

true if the two objects have the same members