# dc-binary-tree-node

> Vertex data controller for binary trees

Latest version **0.0.1** (published 2019-04-20) · MIT license · 0 weekly downloads

## Install

```sh
npm install dc-binary-tree-node
pnpm add dc-binary-tree-node
yarn add dc-binary-tree-node
bun add dc-binary-tree-node
```

## 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.1 |
| Published | 2019-04-20 |
| First published | 2019-04-20 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | JoseBarrios |
| Maintainers | josebarrios |

## Links

- npm: https://www.npmjs.com/package/dc-binary-tree-node
- Repository: https://github.com/JoseBarrios/dc-binary-tree-node
- Homepage: https://github.com/JoseBarrios/dc-binary-tree-node#readme
- Issues: https://github.com/JoseBarrios/dc-binary-tree-node/issues
- npm.io page: https://npm.io/package/dc-binary-tree-node

## Dependencies (1)

- [dc-thing](https://npm.io/package/dc-thing.md) ^0.3.13

## Recent versions

- 0.0.1 (latest) — 2019-04-20

## README

# Usage

```javascript
//Initialize
let vertex = new Vertex('key', 'value');
let n1 = new Vertex(1, 'one');
let n2 = new Vertex(2, 'two');

//Append neighbours to vertex instance
vertex.addNeighbour(n1);
vertex.addNeighbour(n2);

//Get number of neighbours in vertex instance
let numNeighbours = vertex.degree; // 2

//Get all neighbours in vertex instance
let neighbourhood = vertex.neighbourhood();// Map {1:'one', 2:'two'}

vertex.hasNeighbour(1);// True
vertex.hasNeighbour(3);// False

vertex.getNeighbour(1);// "one"

vertex.delete(2);
vertex.getNeighbour(2);// "null"
numNeighbours = vertex.degree; // 1
neighbourhood = vertex.neighbourhood();// Map {1:'one'}

```

# Requirements

1. ES6, or compiler
2. Node ^4.4.4

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