# most-trees

> A small javascript library that allows you to implement most tree data structures

Latest version **2.2.0** (published 2020-07-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install most-trees
pnpm add most-trees
yarn add most-trees
bun add most-trees
```

## 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 | 2.2.0 |
| Published | 2020-07-11 |
| First published | 2020-07-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 28.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Zebediah Perkins |
| Maintainers | zebediahperkins |
| Keywords | binary, search, expression, math, tree, trees, data, structures |

## Links

- npm: https://www.npmjs.com/package/most-trees
- Repository: https://github.com/zebediahperkins/most-trees
- Homepage: https://github.com/zebediahperkins/most-trees/blob/master/README.md
- Issues: https://github.com/zebediahperkins/most-trees/issues
- npm.io page: https://npm.io/package/most-trees

## Alternatives

- [gamedig](https://npm.io/package/gamedig.md) — 29.3K weekly downloads
- [join-monster](https://npm.io/package/join-monster.md) — 12.8K weekly downloads
- [masked](https://npm.io/package/masked.md) — 5.5K weekly downloads
- [@comunica/actor-query-process-explain-logical](https://npm.io/package/@comunica/actor-query-process-explain-logical.md) — 4.7K weekly downloads
- [@veracity/vui](https://npm.io/package/@veracity/vui.md) — 4.6K weekly downloads

## Recent versions

- 2.2.0 (latest) — 2020-07-11
- 2.1.6 — 2020-07-11
- 2.1.5 — 2020-07-10
- 2.1.4 — 2020-07-10
- 2.1.3 — 2020-07-10
- 2.1.2 — 2020-07-10
- 2.1.1 — 2020-07-10
- 2.1.0 — 2020-07-10
- 2.0.0 — 2020-07-09
- 1.1.3 — 2020-07-06
- 1.1.2 — 2020-07-06
- 1.1.1 — 2020-07-06
- 1.0.1 — 2020-07-05
- 1.0.0 — 2020-07-05

## README

<h1>most-trees<br><img src="https://img.shields.io/npm/dt/most-trees.svg"> <img src="https://img.shields.io/npm/dm/most-trees.svg"> <img src="https://img.shields.io/github/forks/zebediahperkins/most-trees"> <img src="https://img.shields.io/github/stars/zebediahperkins/most-trees"> <img src="https://img.shields.io/github/license/zebediahperkins/most-trees"></h1>

<p>A small javascript library that allows you to implement most tree data structures</p>
<h2>Features/<a href="https://zebediahperkins.github.io/most-trees/index.html">Documentation</a></h2>
<ul>
    <li><a href="https://zebediahperkins.github.io/most-trees/BinaryTree.html">Binary Search Trees</a></li>
    <li>(Coming soon)Self Balancing Binary Search Trees</li>
    <li><a href="https://zebediahperkins.github.io/most-trees/ExpressionTree.html">Expression Trees</a></li>
    <li><a href="https://zebediahperkins.github.io/most-trees/BinaryNode.html">Binary Node</a></li>
</ul>
<h2>Usage</h2>
<p>Install most-trees using npm:</p>

```
    > npm install most-trees
```

<p>Next, require the package, and use the assets you need:</p>

```javascript
    const { ExpressionTree, BinaryTree } = require('most-trees');

    let expTree = new ExpressionTree('3x*(2x+2)-83');

    let bst = new BinaryTree([1, 2, 5, -51, 3, -14]);
    bst.insert(142);
    if (bst.search(3)) if (bst.remove(3)) console.log('removed 3 from tree');
    console.log(bst.toArray()); //logs [-51, -14, 1, 2, 5, 142]
```

<h2>Testing</h2>
<p>To run testing for this library, install the dev-dependencies with:</p>

```
    > npm install
```

<p>Then, execute the tests:</p>

```
    > npm test
```

<h2>License</h2>
<p>MIT License</p><br>
<p>Copyright (c) 2020 Zebediah Perkins</p><br>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:</p><br>
<p>The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.</p><br>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.</p>

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