Socket
Book a DemoInstallSign in
Socket

compare-obj

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package version was removed
This package version has been unpublished, mostly likely due to security reasons

compare-obj

Recursively compare 2 objects on a property bases to get the difference

unpublished
Source
npmnpm
Version
1.1.1
Version published
Weekly downloads
7
250%
Maintainers
1
Weekly downloads
 
Created
Source

compare-obj

package version package downloads standard-readme compliant package license make a pull request

Recursively compare 2 objects on a property bases to get the difference

Table of Contents

About

Explain the problem the package is trying to solve.

Features

  • Name key features e.g. size, performance, how it differs from similar solutions etc.

Usage

const compare = require('compare-obj')

const data = {
  id: 'foobarbaz',
  name: 'Bazzy',
  contactNumber: '0000000',
  contactIds: ['one', 'two', 'three']
}

const initialValues = {
  id: 'foobarbaz',
  name: 'Bazzy',
  contactIds: ['one', 'two']
}

console.log(compare(data, initialValues))
// { contactNumber: '0000000', contactIds: [ 'three' ] }

Install

This project uses node and npm.

$ npm install compare-obj
$ # OR
$ yarn add compare-obj

Contribute

  • Fork it and create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am "Add some feature"
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request

License

MIT

Keywords

object

FAQs

Package last updated on 24 Nov 2025

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