key value store implementation or hash in javascript