# @structured/binary-tree

> A simple binary tree and so much more.

Latest version **1.2.2** (published 2021-02-28) · MIT license · 0 weekly downloads

## Install

```sh
npm install @structured/binary-tree
pnpm add @structured/binary-tree
yarn add @structured/binary-tree
bun add @structured/binary-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.2.2 |
| Published | 2021-02-28 |
| First published | 2021-02-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 27.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | shlappas |

## Links

- npm: https://www.npmjs.com/package/@structured/binary-tree
- Repository: https://github.com/js-structured/structured
- Homepage: https://github.com/js-structured/structured/packages/binary-tree#readme
- Issues: https://github.com/js-structured/structured/issues
- npm.io page: https://npm.io/package/@structured/binary-tree

## Recent versions

- 1.2.2 (latest) — 2021-02-28
- 1.2.1 — 2021-02-28
- 1.2.0 — 2021-02-24
- 1.1.0 — 2021-02-24
- 1.0.4 — 2021-02-23
- 1.0.3 — 2021-02-23
- 1.0.2 — 2021-02-23
- 1.0.1 — 2021-02-23

## README

# `@structured/binary-tree`

A simple binary tree and so much more.

## Installation

```
yarn add @structured/binary-tree
```

## Usage

```javascript
import { singleLeft } from '@structured/binary-tree';

let root = {
  data: 'a',
  right: {
    data: 'b',
    right: {
      data: 'c',
    },
  },
}

// Balance the tree with a left rotation!
root = singleLeft(root)
// {
//   data: 'b',
//   left: { data: 'a' },
//   right: { data: 'c' },
// }
```

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