Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roccomuso/keyv-leveldb
LevelDB Storage adapter for Keyv
https://github.com/roccomuso/keyv-leveldb
adapter js keyv keyvaluestore leveldb levelup nodejs storage
Last synced: about 1 month ago
JSON representation
LevelDB Storage adapter for Keyv
- Host: GitHub
- URL: https://github.com/roccomuso/keyv-leveldb
- Owner: roccomuso
- Created: 2018-03-21T10:00:13.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-22T14:26:15.000Z (almost 7 years ago)
- Last Synced: 2024-10-24T13:48:25.538Z (about 2 months ago)
- Topics: adapter, js, keyv, keyvaluestore, leveldb, levelup, nodejs, storage
- Language: JavaScript
- Homepage:
- Size: 48.8 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @keyv/leveldb [](https://github.com/lukechilds/keyv)
> LevelDB storage adapter for Keyv
[![Build Status](https://travis-ci.org/roccomuso/keyv-leveldb.svg?branch=master)](https://travis-ci.org/roccomuso/keyv-leveldb)
[![Coverage Status](https://coveralls.io/repos/github/roccomuso/keyv-leveldb/badge.svg?branch=master)](https://coveralls.io/github/roccomuso/keyv-leveldb?branch=master)
[![npm](https://img.shields.io/npm/v/@keyv/leveldb.svg)](https://www.npmjs.com/package/@keyv/leveldb)LevelDB storage adapter for [Keyv](https://github.com/lukechilds/keyv).
## Install
```shell
npm install --save keyv @keyv/leveldb
```## Usage
```js
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](https://github.com/level/leveldown/#options).
e.g:
```js
const keyv = new Keyv('leveldb://test/DB', { createIfMissing: false });
```Or you can manually create a storage adapter instance and pass it to Keyv:
```js
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](https://twitter.com/roccomuso))