# kad-consistency

> Kad wrapper with consistency improvements

Latest version **0.0.4** (published 2016-09-01) · LGPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install kad-consistency
pnpm add kad-consistency
yarn add kad-consistency
bun add kad-consistency
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2016-09-01 |
| First published | 2016-05-12 |
| Weekly downloads | 0 |
| License | LGPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Michał Żmuda |
| Maintainers | zmuda |
| Keywords | kad, consistency, kademlia |

## Links

- npm: https://www.npmjs.com/package/kad-consistency
- Repository: https://github.com/zmumi/kad-consistency
- Homepage: https://github.com/zmumi/kad-consistency#readme
- Issues: https://github.com/zmumi/kad-consistency/issues
- npm.io page: https://npm.io/package/kad-consistency

## Dependencies (2)

- [kad](https://npm.io/package/kad.md) ^1.5.17
- [async](https://npm.io/package/async.md) 2.0.0-rc.3

## Recent versions

- 0.0.4 (latest) — 2016-09-01
- 0.0.3 — 2016-08-29
- 0.0.2 — 2016-06-03
- 0.0.1 — 2016-05-12

## README

Kad Consistency
=============

Extension with simple consistency checks for
[Kad](https://github.com/gordonwritescode/kad).

Usage
-----

Install with NPM.

```bash
npm install kad kad-consistency
```

Integrate with your Kad project.

```js
var kad = require('kad');
var consistency = require('kad-consistency');
var Node = consistency.ConsistentNode(kad.Node);

var seed = {
  address: '127.0.0.1',
  port: 1338
};

var dht = new Node({
  transport: kad.transports.UDP(kad.contacts.AddressPortContact({
    address: '127.0.0.1',
    port: 1337
  })),
  storage: kad.storage.FS('path/to/datadir')
});

dht.connect(seed, function(err) {
  // dht.get(key, callback);
  // dht.put(key, value, callback);
});
```

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