title: Hashing JavaScript objects
body: <p>I have a function that receives a list of JS objects as an argument. I need to store information about those objects in a private variable for future reference. I do not want to stuff a property into the objects themselves, I just want to keep it out of band in a dictionary. I need to be able to lookup metadata for an object in sub-linear time. </p>
  
  <p>For this I need a <code>hash</code> function such that, for any two objects <code>o1</code> and <code>o2</code>, </p>
  
  <p><code>hash(o1) !== hash(o2)</code> whenever <code>o1 !== o2</code>.</p>
  
  <p>A perfect example of such a hash function would be the memory address of the object, but I don't think JS exposes that. Is there a way?</p>