promisify-level
Wraps a leveldb instance's methods with util.promisify
and allows you to choose which API you want to use. Bring your own leveldb instance.
installation
yarn add promisify-level
or
npm i --save promisify-level
Using node 8
which has util.promisify
implemented. Should work with webpack
and in the browser. Feel free to log issues
usage
const level = ;const promisifyLevelDB = ; { const db = ; const promisifiedDB = ; try await promisifiedDB; const value = await promisifiedDB; console; // -> 'bar' catch err // handle errors here } ;
license
MIT