So, this is precisely the sort of iteration-related, actually-relatively-simple task that I usually rely on Lodash to implement for me; so, in that vein, would the following function, or an approximation thereof, be welcome?
function isShallowEqual(v, o) {
for(var key in v)
if(!(key in o) || v[key] !== o[key])
return false
for(var key in o)
if(!(key in v) || v[key] !== o[key])
return false
return true }
So, this is precisely the sort of iteration-related, actually-relatively-simple task that I usually rely on Lodash to implement for me; so, in that vein, would the following function, or an approximation thereof, be welcome?