New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

deep-compare-objects

Package Overview
Dependencies
Maintainers
0
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deep-compare-objects

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

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
increased by600%
Maintainers
0
Weekly downloads
 
Created
Source

Deep Compare Objects

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.

Features

  • Deep comparison of nested objects and arrays.
  • Detects added, removed, and changed properties.
  • Simple and intuitive API.
  • Lightweight and dependency-free.

Installation

You can install this module via npm:

npm install deep-compare-objects

or via yarn:

yarn add deep-compare-objects

Usage

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' }

License

This project is licensed under the MIT License. See the LICENSE file for details.

Keywords

FAQs

Package last updated on 22 Jun 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc