@orbitdb/feed-db
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

@orbitdb/feed-db

Feed database type for orbit-db.

feed-db tests codecov

Installation

$ pnpm add @constl/orbit-db-feed

Introduction

Feed database for those feeling nostalgic for orbit-db v.0.x. But honestly, you're probably better off with a KeyValue or a Set.

Examples

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: "..." }]

Readme

Keywords

Package Sidebar

Install

npm i @orbitdb/feed-db

Weekly Downloads

790

Version

1.0.0

License

AGPL-3.0-or-later

Unpacked Size

220 kB

Total Files

46

Last publish

Collaborators

  • julien.malard
  • aphelionz
  • spauldingsmails
  • haad