# orbit-db-feedstore

> Feed store for orbit-db

Latest version **2.0.0** (published 2023-01-18) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

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

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2023-01-18 |
| First published | 2016-05-07 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 10.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 16 |
| Author | Haad |
| Maintainers | haad, shamb0t, hajamark |
| Keywords | orbit-db, orbitdb, database, log-database |

## Links

- npm: https://www.npmjs.com/package/orbit-db-feedstore
- Repository: https://github.com/orbitdb/orbit-db-feedstore
- Issues: https://github.com/orbitdb/orbit-db-feedstore/issues
- npm.io page: https://npm.io/package/orbit-db-feedstore

## Dependencies (1)

- [orbit-db-eventstore](https://npm.io/package/orbit-db-eventstore.md) *

## Alternatives

- [cli-color](https://npm.io/package/cli-color.md) — 3.4M weekly downloads
- [log](https://npm.io/package/log.md) — 1.3M weekly downloads
- [logstash-client](https://npm.io/package/logstash-client.md) — 4.5K weekly downloads
- [@nocobase/plugin-logger](https://npm.io/package/@nocobase/plugin-logger.md) — 2.0K weekly downloads
- [child-process-debug](https://npm.io/package/child-process-debug.md) — 695 weekly downloads

## Recent versions

- 2.0.0 (latest) — 2023-01-18
- 2.0.1-9e25462.0 (next) — 2023-01-18
- 1.12.1-9c97c79.0 — 2023-01-11
- 1.12.1-d1f661e.0 — 2023-01-11
- 1.12.0 — 2020-09-16
- 1.11.0 — 2020-09-11
- 1.10.0 — 2020-09-06
- 1.9.0 — 2020-05-12
- 1.8.0 — 2020-03-14
- 1.7.0 — 2019-12-05
- 1.6.0 — 2019-10-03
- 1.6.0-rc1 — 2019-08-30
- 1.5.1 — 2019-05-06
- 1.4.1 — 2019-05-06
- 1.5.0 — 2019-05-03
- … 34 more at https://npm.io/package/orbit-db-feedstore/versions

## README

# orbit-db-feedstore

[![npm version](https://badge.fury.io/js/orbit-db-feedstore.svg)](https://badge.fury.io/js/orbit-db-feedstore)
[![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)

> Log database for orbit-db

A log database with traversable history. Entries can be added and removed. Useful for *"shopping cart"* type of use cases, or for example as a feed of blog posts or *"tweets"*.

Used in [orbit-db](https://github.com/haadcode/orbit-db).

## Table of Contents

- [Install](#install)
- [Usage](#usage)
- [API](#api)
- [Contributing](#contributing)
- [License](#license)

## Install

This project uses [npm](https://npmjs.com) and [node](https://nodejs.org)

```sh
npm install orbit-db ipfs
```

## Usage

First, create an instance of OrbitDB:

```javascript
import * as IPFS from 'ipfs'
import OrbitDB from 'orbit-db'

const ipfs = new IPFS()
const orbitdb = await OrbitDB.createInstance(ipfs)
```

Get a feed database and add an entry to it:

```javascript
const feed = await orbitdb.feed('haad.posts')
feed.add({ title: 'Hello', content: 'World' })
  .then(() => {
    const posts = feed.iterator().collect()
    posts.forEach((post) => {
      let data = post.payload.value
      console.log(data.title + '\n', data.content)
      // Hello
      //  World   
    })
  })
```

Later, when the database contains data, load the history and query when ready:

```javascript
const feed = await orbitdb.feed('haad.posts')
feed.events.on('ready', () => {
  const posts = feed.iterator().collect()
  posts.forEach((post) => console.log(post.title + '\n', post.content))
  // Hello
  // World  
})
```

## API

See [orbit-db's API Documenations](https://github.com/orbitdb/orbit-db/blob/master/API.md#feedname) for full details.

## Contributing

If you think this could be better, please [open an issue](https://github.com/orbitdb/orbit-db-feedstore/issues/new)!

Please note that all interactions in [@orbitdb](https://github.com/orbitdb) fall under our [Code of Conduct](CODE_OF_CONDUCT.md).

Note: Tests for this repo are in the [`orbit-db`](https://github.com/orbitdb/orbit-db) repository.

## License

[MIT](LICENSE) © 2016-2020 Protocol Labs Inc., Haja Networks Oy

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