# @tradle/changes-feed

> Basic changes-feed implementation that runs on top of leveldb

Latest version **1.1.1** (published 2022-01-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @tradle/changes-feed
pnpm add @tradle/changes-feed
yarn add @tradle/changes-feed
bun add @tradle/changes-feed
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.1 |
| Published | 2022-01-19 |
| First published | 2022-01-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 14.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 28 |
| Author | Mathias Buus |
| Maintainers | leichtgewicht, genevayngrib, tenaciousmv, pgmemk |

## Links

- npm: https://www.npmjs.com/package/@tradle/changes-feed
- Repository: https://github.com/mafintosh/changes-feed
- Issues: https://github.com/mafintosh/changes-feed/issues
- npm.io page: https://npm.io/package/@tradle/changes-feed

## Dependencies (6)

- [pump](https://npm.io/package/pump.md) ^3.0.0
- [from2](https://npm.io/package/from2.md) ^2.3.0
- [thunky](https://npm.io/package/thunky.md) ^0.1.0
- [through2](https://npm.io/package/through2.md) ^4.0.2
- [stream-collector](https://npm.io/package/stream-collector.md) ^1.0.1
- [lexicographic-integer](https://npm.io/package/lexicographic-integer.md) ^1.1.0

## Recent versions

- 1.1.1 (latest) — 2022-01-19

## README

> Fork of [changes-feed](https://github.com/mafintosh/changes-feed) maintained by [@tradle](https://github.com/tradle).

# changes-feed

Basic changes-feed implementation that runs on top of leveldb

```
npm install changes-feed
```

[![build status](http://img.shields.io/travis/mafintosh/changes-feed.svg?style=flat)](http://travis-ci.org/mafintosh/changes-feed)

## Usage

``` js
var changes = require('changes-feed')
var feed = changes(db) // db is a levelup

feed.createReadStream({live:true})
  .on('data', function(data) {
    console.log('someone appended:', data)
  })

feed.append('hello')
```

## API

#### `feed.append(value)`

Append a new value to the changes feed. The value should be a string or buffer

#### `stream = feed.createReadStream([options])`

Stream out entries from the log. Per default this will stream out all entries.
Options include:

``` js
{
  live: true,   // keep the stream open,
  since: number // only get changes >number
}
```

A stream data object looks like this

``` js
{
  change: number, // incrementing change number
  value: value    // the value appended
}
```

## License

MIT

---
_Source: https://npm.io/package/@tradle/changes-feed · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
