Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/RangerMauve/pouchdb-adapter-hyperbee
Adapter for PouchDB to load p2p data from Hyperbee
https://github.com/RangerMauve/pouchdb-adapter-hyperbee
Last synced: 1 day ago
JSON representation
Adapter for PouchDB to load p2p data from Hyperbee
- Host: GitHub
- URL: https://github.com/RangerMauve/pouchdb-adapter-hyperbee
- Owner: RangerMauve
- License: agpl-3.0
- Created: 2021-01-08T19:16:29.000Z (almost 4 years ago)
- Default Branch: default
- Last Pushed: 2024-02-21T19:01:27.000Z (9 months ago)
- Last Synced: 2024-11-09T07:12:08.583Z (8 days ago)
- Language: JavaScript
- Homepage:
- Size: 24.4 KB
- Stars: 13
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-pears - pouchdb-adapter-hyperbee - Adapter for PouchDB to load p2p data from Hyperbee (**Awesome Pears 🍐** / Building Blocks)
- awesome-pears - pouchdb-adapter-hyperbee - Adapter for PouchDB to load p2p data from Hyperbee (**Awesome Pears 🍐** / Building Blocks)
README
# pouchdb-adapter-hyperbee
Adapter for PouchDB to load p2p data from Hyperbee
## Example
```JavaScript
PouchDB.plugin(require('pouchdb-adapter-hyperbee')())// You can pass any valid `hyper://` URL
// URLs with a `name` in them will generate a local hyperbee
// You can sparsely load remote DBs with a full `hyper://` URL
const pouch = new PouchDB('hyper://example', {
adapter: 'hyperbee'
})// Wait for the DB to open if you want to access the bee directly
pouch.once('open', () => {
const url = await pouch.getURL()// In case you want to access the hyperbee instance directly
const bee = pouch.bee
})
```