Skip to content

Latest commit

 

History

History
47 lines (30 loc) · 1.38 KB

README.md

File metadata and controls

47 lines (30 loc) · 1.38 KB

@keyv/leveldb keyv

LevelDB storage adapter for Keyv

Build Status Coverage Status npm

LevelDB storage adapter for Keyv.

Install

npm install --save keyv @keyv/leveldb

Usage

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 });

License

MIT © Rocco Musolino (@roccomuso)