Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@trinitymirrordigital/deep_equals

Package Overview
Dependencies
Maintainers
2
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@trinitymirrordigital/deep_equals

To deep compare objects

  • 1.2.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
2
Weekly downloads
 
Created
Source

@trinitymirrordigital/deep_equals

Function to deep compare two objects or arrays for changes

Usage

import deepEquals from '@trinitymirrordigital/deep_equals';

const obj1 = {
  test: 'foo',
  test2: [1, 2, 3]
}

const obj2 = {
  test: 'foo',
  test2: [1, 2, 3]
}

const obj3 = {
  test: 'foo',
  test2: [1, 2, 2]
}

obj1 === obj2 // returns false
deepEquals(obj1, obj2); // return true

obj1 === obj3 // returns false
deepEquals(obj1, obj3); // return false

const array1 = [{
  test: 'foo',
  test2: [1, 2, 3]
}]

const array2 = [{
  test: 'foo',
  test2: [1, 2, 3]
}]

const array3 = [{
  test: 'foo',
  test2: [1, 2, 2]
}]

array1 === array2 // returns false
deepEquals(array1, array2); // return true

array1 === array3 // returns false
deepEquals(array1, array3); // return false

Keywords

FAQs

Package last updated on 06 Oct 2020

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