LevelDB storage adapter for Keyv
LevelDB storage adapter for Keyv.
npm install --save keyv @keyv/leveldb
const Keyv = require('keyv');
const keyv = new Keyv('leveldb://test/DB');
keyv.on('error', handleConnectionError);
Any valid options will be passed directly to the underlying store.
e.g:
const keyv = new Keyv('leveldb://test/DB', { createIfMissing: false });
Or you can manually create a storage adapter instance and pass it to Keyv:
const Keyv = require('keyv');
const KeyvLevelDB = require('@keyv/leveldb');
const leveldb = new KeyvLevelDB('leveldb://test/DB');
const keyv = new Keyv({ store: leveldb });
MIT © Rocco Musolino (@roccomuso)