Recursively compare 2 objects on a property bases to get the difference
Built with ❤︎ by Tiaan and contributors
$ npm install --save compare-obj
# OR
$ yarn add compare-objconst compareObj = require('compare-obj')
const obj1 = {
foo: 5,
bar: 9,
baz: {
goo: 6,
foo: {
hello: 'world'
}
}
}
const obj2 = {
foo: 5,
baz: {
goo: 6
}
}
console.log(compareObj(obj1, obj2))
// { bar: 9, baz: { foo: { hello: 'world' } } }Contributions are welcome. Please open up an issue or create PR if you would like to help out.
Note: If editing the README, please conform to the standard-readme specification.
Licensed under the MIT License.