Is there a way I can do a shallow comparison that will not go down and compare the contents of objects inside of objects in Javascript or lodash? Note that I did check lodas
keeping in mind that it only for shallow and only for strings and numbers
function equals(obj1, obj2) { return Object.keys(obj1) .concat(Object.keys(obj2)) .every(key => { return obj1[key] === obj2[key]; }); }