first crack at a JS version

this is just is a port of identifyHash and should work in the browser as well as node.  A separate class can be added to handle file input via node.