Skip to content

roccomuso/keyv-leveldb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@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)