Skip to content

isSameObject

kherP edited this page Jan 2, 2020 · 2 revisions

This utility compares two objects and return true if both objects are equal.

Example

const obj1= { a: "c" };
const obj2 = { a: "c" };
const result = isSameObject(obj1, obj2 );
console.log(result); // true

Properties

Param Type Description
objectA object First object
objectB object Second object to be compared against
deep boolean Optional params. If object consists of multiple level attributes, please set to true
Clone this wiki locally