# ss-tree

> [![Build Status](https://travis-ci.org/boycgit/ss-tree.svg?branch=master)](https://travis-ci.org/boycgit/ss-tree) [![Coverage Status](https://coveralls.io/repos/github/boycgit/ss-tree/badge.svg?branch=master)](https://coveralls.io/github/boycgit/ss-tree?b

Latest version **1.0.5** (published 2018-11-21) · 0 weekly downloads

## Install

```sh
npm install ss-tree
pnpm add ss-tree
yarn add ss-tree
bun add ss-tree
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.5 |
| Published | 2018-11-21 |
| First published | 2018-11-16 |
| Weekly downloads | 0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 3 |
| Unpacked size | 242.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | boycgit |
| Maintainers | jscon |

## Links

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

## Dependencies (3)

- [ss-queue](https://npm.io/package/ss-queue.md) ^1.0.5
- [ss-stack](https://npm.io/package/ss-stack.md) ^1.0.7
- [ss-comparator](https://npm.io/package/ss-comparator.md) ^1.0.0

## Recent versions

- 1.0.5 (latest) — 2018-11-21
- 1.0.4 — 2018-11-16
- 1.0.3 — 2018-11-16
- 1.0.1 — 2018-11-16

## README

# ss-tree

[![Build Status](https://travis-ci.org/boycgit/ss-tree.svg?branch=master)](https://travis-ci.org/boycgit/ss-tree) [![Coverage Status](https://coveralls.io/repos/github/boycgit/ss-tree/badge.svg?branch=master)](https://coveralls.io/github/boycgit/ss-tree?branch=master) [![MIT Licence](https://badges.frapsoft.com/os/mit/mit.svg?v=103)](https://opensource.org/licenses/mit-license.php) [![npm version](https://badge.fury.io/js/ss-tree.svg)](https://badge.fury.io/js/ss-tree)

Data Structure Serial -  Tree

 - written in Typescript
 - fully tested


## Installation

### Node.js / Browserify

```bash
npm install ss-tree --save
```

```javascript
var {Tree, TreeNode} = require('ss-tree');
```

### Global object

Include the pre-built script.

```html
<script src="./dist/index.umd.min.js"></script>

```

## Build & test

```bash
npm run build
```

```bash
npm test
```

## document

主要注意：
 - 空树（tree.root = null） 和 根节点为空 (tree.root = new TreeNode()) 的差别；
 - 节点的 `data` 概念和 `value` 是不同的，`data` 是节点最原始的数据，而 `value` 则是 `data` 属性的映射之后的数值
 - 为 BST 能够高效运转，应当让所有数据去重后再存储

```bash
npm run doc
```

then open the generated `out/index.html` file in your browser.

## License

[MIT](LICENSE).

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