# tree-of-trust

> An approach to transitive trust relationships

Latest version **1.2.0** (published 2019-06-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install tree-of-trust
pnpm add tree-of-trust
yarn add tree-of-trust
bun add tree-of-trust
```

## 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.2.0 |
| Published | 2019-06-27 |
| First published | 2019-06-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 15.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Sandro Hawke |
| Maintainers | sandhawke |
| Keywords | sandhawke |

## Links

- npm: https://www.npmjs.com/package/tree-of-trust
- Repository: https://github.com/sandhawke/tree-of-trust
- Homepage: https://github.com/sandhawke/tree-of-trust#readme
- Issues: https://github.com/sandhawke/tree-of-trust/issues
- npm.io page: https://npm.io/package/tree-of-trust

## Dependencies (6)

- [debug](https://npm.io/package/debug.md) ^4.1.0
- [delay](https://npm.io/package/delay.md) ^4.3.0
- [psdad](https://npm.io/package/psdad.md) ^0.4.0
- [keyed-set](https://npm.io/package/keyed-set.md) ^0.6.1
- [live-source](https://npm.io/package/live-source.md) ^0.3.0
- [eventemitter3](https://npm.io/package/eventemitter3.md) ^3.1.2

## Recent versions

- 1.2.0 (latest) — 2019-06-27
- 1.1.1 — 2019-06-14
- 1.1.0 — 2019-06-14
- 1.0.1 — 2019-06-14
- 1.0.0 — 2019-06-13

## README

# tree-of-trust
[![NPM version][npm-image]][npm-url]

This is a reputation graph (trust graph, web of trust, etc) system for
flextags. It could perhaps be more abstracted from them to be more
clearer, but it's not there yet.

```js
const {Tree} = require('tree-of-trust')
const opener = require('live-source')
const delay = require('delay')

const rootURL = 'https://www.w3.org/People/Sandro/tree-of-trust/alice'
const tree = new Tree({ rootURL, opener })

// We combine the delay of getting the data into generally assuming
// the data might change. There's no "crawl complete" because the web
// is never static, right?  Still we should have a crawl complete, but
// don't yet.
delay(2000).then(() => {
  const danyURL = 'https://www.w3.org/People/Sandro/tree-of-trust/dany'
  const dany = opener.open(danyURL)
  console.log(dany.trust)
  // => 0.512
  console.log(tree.accepted.has(dany))
  // => true
  opener.closeAll()
})
```


[npm-image]: https://img.shields.io/npm/v/tree-of-trust.svg?style=flat-square
[npm-url]: https://npmjs.org/package/tree-of-trust

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