New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

x-deep-object-equal

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

x-deep-object-equal

**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.

latest
npmnpm
Version
10.0.1
Version published
Maintainers
1
Created
Source

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!

Keywords

diff deep object

FAQs

Package last updated on 01 Sep 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts