loot-diff

1.0.1 • Public • Published

Object Difference

based on http://blog.vjeux.com/2011/javascript/object-difference.html

It is very minimal and not perfect.

var obj1 = {
    foo: 1
    bar: {
        baz: "zap",
        buzz: false
    },
};
 
var obj2 = {
    foo: 2
    bar: {
        baz: "zap",
        buzz: true
    }
};
 
console.log(diff(obj1, obj2));
 
// should log
{
    foo: 2,
    bar: {
        buzz: true
    }
}
 

browser useage

the webpack build output lib/loot-diff.min.js expects lodash to be available globally as _

Readme

Keywords

Package Sidebar

Install

npm i loot-diff

Weekly Downloads

9

Version

1.0.1

License

MIT

Last publish

Collaborators

  • loot