x-deep-object-equal
v10.0.1
Published
**xDeepObjectEqual** is a TypeScript function that allows you to deeply compare two objects for equality. It traverses nested objects and their properties to determine if they are equal.
Downloads
2
Maintainers
Readme
xDeepObjectEqual is a TypeScript function that allows you to deeply compare two objects for equality. It traverses nested objects and their properties to determine if they are equal.
Installation
To use xDeepObjectEqual, you'll need to include the provided TypeScript file in your project.
- Download the
xDeepObjectEqual.ts
file from this repository. - Add the file to your project directory.
Usage
Import the
xDeepObjectEqual
class into your TypeScript code:import { xDeepObjectEqual } from 'x-deep-object-equal' const firstObject = { a: 1, b: { c: 2, d: { e: 3, }, }, }; const secondObject = { a: 1, b: { c: 2, d: { e: 3, }, }, f: 5, }; xDeepObjectEqual(firstObject, secondObject); // false
Import the
xDeepObjectEqual
class into your Javascript code:const { xDeepObjectEqual } = require("x-deep-object-equal") xDeepObjectEqual(firstObject, secondObject); // false
Support Me
If you find this project helpful or want to show your appreciation, you can support me by buying me a coffee. Your support is greatly appreciated!