# loki-msgpack-adapter

> A LokiJS persistence adapter saving the database as an msgpack encoded file.

Latest version **1.0.0** (published 2016-05-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install loki-msgpack-adapter
pnpm add loki-msgpack-adapter
yarn add loki-msgpack-adapter
bun add loki-msgpack-adapter
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2016-05-30 |
| First published | 2016-05-30 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Joscha Rohmann |
| Maintainers | kanaye |
| Keywords | lokijs, msgpack, persistence-adapter |

## Links

- npm: https://www.npmjs.com/package/loki-msgpack-adapter
- Repository: https://github.com/Kanaye/loki-msgpack-adapter
- Homepage: https://github.com/Kanaye/loki-msgpack-adapter#readme
- Issues: https://github.com/Kanaye/loki-msgpack-adapter/issues
- npm.io page: https://npm.io/package/loki-msgpack-adapter

## Dependencies (2)

- [lokijs](https://npm.io/package/lokijs.md) ^1.3.16
- [msgpack-lite](https://npm.io/package/msgpack-lite.md) ^0.1.18

## Recent versions

- 1.0.0 (latest) — 2016-05-30

## README

# loki-msgpack-adapter
A simple [lokijs](https://github.com/techfort/lokijs) "proxy" adapter using [msgpack-lite](https://github.com/kawanet/msgpack-lite) to serialize the database.

## Usage
``npm i --save loki-msgpack-adapter``
```javascript
// Should work with all normal (not reference) mode persistenceAdapters
var myAdapter = new myPersistenceAdapter(/*...*/);
// if you don't pass an adapter we will try to use lokijs fs adapter
var proxy = new lokiMsgpackAdapter({adapter: myAdapter});

var db = new loki('test.db', {adapter: proxy /* ... */});
/* use your db as normal */
// ...
db.saveDatabase();
// Your adapter saved the db in the messagepack format
```
In browser just drop in [lokijs](https://github.com/techfort/lokijs) and [msgpack-lite](https://github.com/kawanet/msgpack-lite) and your are ready to go.

In node  loki-msgpack will require the dependencies itself.

If you are using something like browserify or webpack all should work fine :).
## Having questions ? Found a bug ? Need a feature ?
Just open an issue here or even better a pull request.

I'd love to see contibution. 

## Thanks to
- @[techfort](https://github.com/techfort) and all lokijs contributors for building and maintaining lokijs
- @[kawanet](https://github.com/kawanet) and all msgpack-lite contributors for building and maintaining msgpack-lite. 

These are awesome projects.

---
_Source: https://npm.io/package/loki-msgpack-adapter · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
