leveldb implementation in resources.js