deep-object-diff icon indicating copy to clipboard operation
deep-object-diff copied to clipboard

Deep diffs two objects, including nested structures of arrays and objects, and returns the difference. ❄️

Results 38 deep-object-diff issues
Sort by recently updated
recently updated
newest added

I am just trying this library for simple arrays and it's not working as I expected. This is the code: ``` const a1 = [2, 5, 8, 20]; const a2...

Because there is no way to define the output of the type, and we should avoid `updatedDiff(objectA, objectB) as MyType` we introduce generics. Now we can just do `updatedDiff(objectA, objectB)`....

I think I'm just re-reporting https://github.com/mattphillips/deep-object-diff/issues/79. `diff({ test: [] }, { test: ['apple'] })` returns `{ test: { 0: 'apple' }`

https://github.com/mattphillips/deep-object-diff/blob/a24d61fea6d6d644fc3e32a853f685953d6d5b41/src/added.js#LL5C1-L5C1 ```javascript if (lhs === rhs || !isObject(lhs) || !isObject(rhs)) return {}; ``` If we could return `null` here, so that in detailedDiff we could receive `added: null`, it would...

I moved `types` condition to the front. `package.json#exports` are **order-sensitive** - they are always matched from the top to the bottom. When a match is found then it should be...

It would be great if you could give a third parameter to the methods with a few configuration options, like for example: - comparing operator: Strict (===) or Loose(==). And...

Could you also export a function called `equals` like so? ``` const equals = (a, b) => Object.keys(diff(a, b)).length === 0; ``` This would make it more obvious that additional...

I know this is a duplicate of some Issues, but I haven't found a solution yet. Here is an example: https://gist.github.com/blockiyt/0e37ca606ec232b38599d271d6aacdd9 Is it possible to fix that, or to add...

This is a bit of a POC to add type definitions for each diff function that works correctly. I've not exhaustively tested this yet so don't know if it covers...