# orbit-db-pouch

> OrbitDB store backed by PouchDB.

Latest version **0.0.6** (published 2022-03-01) · MIT license · 0 weekly downloads

## Install

```sh
npm install orbit-db-pouch
pnpm add orbit-db-pouch
yarn add orbit-db-pouch
bun add orbit-db-pouch
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.6 |
| Published | 2022-03-01 |
| First published | 2022-02-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 49.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Patrick Toner |
| Maintainers | ptoner |
| Keywords | orbit-db, orbitdb, kv, key-value |

## Links

- npm: https://www.npmjs.com/package/orbit-db-pouch
- Homepage: https://gitlab.com/ptoner/orbit-db-pouch
- Issues: https://gitlab.com/ptoner/orbit-db-pouch/issues
- npm.io page: https://npm.io/package/orbit-db-pouch

## Dependencies (3)

- [pouchdb](https://npm.io/package/pouchdb.md) 7.2.2
- [pouchdb-find](https://npm.io/package/pouchdb-find.md) 7.2.2
- [orbit-db-store](https://npm.io/package/orbit-db-store.md) 4.3.2

## Recent versions

- 0.0.6 (latest) — 2022-03-01
- 0.0.3 — 2022-02-11
- 0.0.2 — 2022-02-10
- 0.0.1 — 2022-02-10

## README

# orbit-db-pouch

[![Gitter](https://img.shields.io/gitter/room/nwjs/nw.js.svg)](https://gitter.im/orbitdb/Lobby) [![Matrix](https://img.shields.io/badge/matrix-%23orbitdb%3Apermaweb.io-blue.svg)](https://riot.permaweb.io/#/room/#orbitdb:permaweb.io) [![Discord](https://img.shields.io/discord/475789330380488707?color=blueviolet&label=discord)](https://discord.gg/cscuf5T)

> Key-Value database for [orbit-db](https://github.com/haadcode/orbit-db) backed by [PouchDB](https://pouchdb.com/).

A key-value datastore for OrbitDB backed by the PouchDB. Orbit handles IPFS + authentication + creating a cryptographic trail of changes. PouchDB is really good at being a searchable database with strong revisioning.

Used in [orbit-db](https://github.com/orbitdb/orbit-db).


## Install


## Usage

First, create an instance of OrbitDB:

```javascript
const PouchStore = require('orbit-db-pouch')
const IPFS = require('ipfs')
const OrbitDB = require('orbit-db')

const ipfs = new IPFS()
const orbitdb = await OrbitDB.createInstance(ipfs)
```

Add custom datastore type

```javascript
OrbitDB.addDatabaseType("pouch", PouchStore)
```

Create a datastore with a schema. In this example we're saving baseball players. We'll add 4 different indexed fields. Indexes and can unique. 

```javascript
store = await orbitdb.open("baseballplayers", {
    create: true, 
    type: "pouch"
})
```
Once opened the PouchDB can be accessed with ".db":
```javascript
await store.db.allDocs() //see PouchDB documentation for more.
```


## License
[MIT](LICENSE)

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