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

object-diff-paths

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

object-diff-paths

Calculates a diff of two objects, and returns the different object paths

  • 1.0.5
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
192
decreased by-29.93%
Maintainers
1
Weekly downloads
 
Created
Source

object-diff-paths

Calculates a diff of 2 objects, and returns a list of the different object paths.

The object paths can then be used in lodash.get/lodash.set.

Installation

$ npm i object-diff-paths

Usage

const o1 = {
    a: {
        b: {
            c: { s: 't' },
        }
    }
};
const o2 = {...o1, a: {...o1.a, b: {...o1.a.b, d: 'e'}}};

const diff = objectDiff(o1, o2);

assert.deepEqual(diff, [
    'a.b.d'
]);

Keywords

FAQs

Package last updated on 25 Aug 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