Home > doofinder > isShallowEqual

isShallowEqual() function

Check whether two values are equivalent or not.

Signature:

export declare function isShallowEqual(objA: any, objB: any): boolean;

Parameters

Parameter Type Description
objA any First value to check.
objB any Second value to check.

Returns:

boolean

A boolean value.

Remarks

Performs equality by iterating through keys on an object and returning false when any key has values which are not strictly equal between the arguments. Returns true when the values of all keys are strictly equal.