https://github.com/orbitdb/feed-db
Feed database type for orbit-db
https://github.com/orbitdb/feed-db
Last synced: 9 months ago
JSON representation
Feed database type for orbit-db
- Host: GitHub
- URL: https://github.com/orbitdb/feed-db
- Owner: orbitdb
- License: agpl-3.0
- Created: 2024-01-20T22:32:08.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-07-21T09:27:39.000Z (11 months ago)
- Last Synced: 2025-07-21T10:25:19.739Z (11 months ago)
- Language: TypeScript
- Size: 845 KB
- Stars: 0
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# @orbitdb/feed-db
Feed database type for orbit-db.
[](https://github.com/orbitdb/feed-db/actions/workflows/run-test.yml)
[](https://codecov.io/gh/orbitdb/feed-db)
## Installation
```
$ pnpm add @orbitdb/feed-db
```
## Introduction
`Feed` database for those feeling nostalgic for orbit-db v.0.x. But honestly, you're probably better off with a [`KeyValue`](https://github.com/orbitdb/core) or a [`Set`](https://github.com/orbitdb/set).
## Examples
```ts
import { createOrbit } from "@orbitdb/core";
import { registerFeed } from "@orbitdb/feed-db";
// Register database type. IMPORTANT - must call before creating orbit instance !
registerFeed();
const db = await orbit.open({ type: "feed" });
await db.add({ a: 1, b: "c" });
const all = await db.all(); // [{ value: { a: 1, b: "c" }, hash: "..." }]
await db.add({ a: 1, b: "c" });
await db.all();
// [{ value: { a: 1, b: "c" }, hash: "..." }, { value: { a: 1, b: "c" }, hash: "..." }]
```