Deep Compare Objects is a JavaScript module designed to deeply compare two JavaScript objects and identify their differences. It's lightweight, easy to use, and efficient for a wide range of use cases.
- Deep comparison of nested objects and arrays.
- Detects added, removed, and changed properties.
- Simple and intuitive API.
- Lightweight and dependency-free.
You can install this module via npm:
npm install deep-compare-objects
or via yarn:
yarn add deep-compare-objects
Here's a quick example to get you started:
import deepCompareObjects from 'deep-compare-objects';
const a = { a: [1, 2, 3], b: { c: 1, d: 1 }, e: 'e', f: 'f', g: {} };
const b = { a: [3, 2, 1], b: { c: 1, d: 2 }, e: 'e', f: 'F', g: {} };
console.log(deepCompareObjects(a, b)); // { a: [ 3, <1 empty item>, 1 ], b: { d: 2 }, f: 'F' }
This project is licensed under the MIT License. See the LICENSE file for details.