Javascript version of hive