utils.js: Add new method objectsEqual()
This commit is contained in:
parent
08c879249b
commit
2a5a403573
|
@ -352,6 +352,14 @@
|
||||||
return keys;
|
return keys;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
objectsEqual: function equals(obj1, obj2) {
|
||||||
|
return Object.keys(obj1)
|
||||||
|
.concat(Object.keys(obj2))
|
||||||
|
.every(function (key) {
|
||||||
|
return obj1[key] === obj2[key];
|
||||||
|
});
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Cleanup
|
* Cleanup
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue