Generate hashes from javascript objects in node and the browser.