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

object-diff

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

object-diff - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

7

package.json
{
"name": "object-diff",
"description": "Get the diff from objectA to objectB",
"version": "0.0.1",
"version": "0.0.2",
"main": "index.js",

@@ -17,4 +17,5 @@ "repository": {

"devDependencies": {
"tape": "^3.0.0",
"extend": "^2.0.0"
"tape": "^3.2.0",
"extend": "^2.0.0",
"testling": "^1.7.1"
},

@@ -21,0 +22,0 @@ "testling": {

# object diff
Get the minimal patch to extend objectA with to transform it into
objectB
Get the minimal patch to extend objectA with to transform it into objectB
[![npm version][npm-image]][npm-url]
Consider an object retrieved from a server:

@@ -16,4 +17,4 @@

Now the user changes stuff using some frontend (e.g. a HTML form) and
ends with:
Now the user changes stuff using some frontend (e.g. a HTML form) and ends
with:

@@ -28,9 +29,9 @@ ```js

When he hits save, you only want to send off the changed parts to the
server, to save bits (because you'r indeed a programmer), but also to
avoid any unnecessary "merge conflicts" at the server.
When he hits save, you only want to send off the changed parts to the servers,
to save bits (because you're indeed a programmer), but also to avoid any
unnecessary "merge conflicts" at the server.
Imagine two users changing the same object; if they did not change the
exact same keys of the object, the last user won't erase the first
user's changes - in a lot of cases, that's the expected behavior.
Imagine two users changing the same object; if they did not change the exact
same keys of the object, the last user won't erase the first user's changes -
in a lot of cases, that's the expected behavior.

@@ -46,3 +47,3 @@ ## Install

```js
var objectDiff = require('object-diff');
var diff = require('object-diff');

@@ -63,3 +64,3 @@ var a = {

objectDiff(a, b);
diff(a, b);
/*

@@ -78,1 +79,3 @@ {

[src.agency](http://src.agency) / Thomas Jensen
[npm-image]: https://img.shields.io/npm/v/object-diff.svg?style=flat
[npm-url]: https://npmjs.org/package/object-diff

Sorry, the diff of this file is not supported yet

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