New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

orbit-db-pouch

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orbit-db-pouch

OrbitDB store backed by PouchDB.

  • 0.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

orbit-db-pouch

Gitter Matrix Discord

Key-Value database for orbit-db backed by PouchDB.

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.

Install

Usage

First, create an instance of OrbitDB:

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

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.

store = await orbitdb.open("baseballplayers", {
    create: true, 
    type: "pouch"
})

Once opened the PouchDB can be accessed with ".db":

await store.db.allDocs() //see PouchDB documentation for more.

License

MIT

Keywords

FAQs

Package last updated on 01 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc