Calculates a diff of two objects, and returns the different object paths
npm install object-diff-pathsThe object paths can then be used in lodash.get/lodash.set.
shell
$ npm i object-diff-paths
`Usage
`javascript
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'
]);
``