identity = obj =>
  (typeof obj === 'object' && obj !== null
    ?  JSON.stringify(Object.keys(obj).sort().map(key => [ key, obj[key] ]))
    : null)
If two objects have the same properties, with the same values
then identity identity(obj) === identity(obj2) will return true.

@param obj
@return string