# @dadcici/tree-utils

> The CICI utility is an integrated tree operation, such as: traversal tree, list-to-tree, tree-to-list, generate branch path based on node ID, and get the level of the node.

Latest version **0.0.16** (published 2018-12-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @dadcici/tree-utils
pnpm add @dadcici/tree-utils
yarn add @dadcici/tree-utils
bun add @dadcici/tree-utils
```

## 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.16 |
| Published | 2018-12-06 |
| First published | 2018-12-06 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 5.2 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | 273203969@qq.com |
| Maintainers | hello-jack |
| Keywords | tree, util, utils |

## Links

- npm: https://www.npmjs.com/package/@dadcici/tree-utils
- npm.io page: https://npm.io/package/@dadcici/tree-utils

## Dependencies (1)

- [vue](https://npm.io/package/vue.md) ^2.5.11

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 0.0.16 (latest) — 2018-12-06
- 0.0.15 — 2018-12-06

## README

#  @dadcici/tree-utils

> The CICI utility is an integrated tree operation, such as: traversal tree, list-to-tree, tree-to-list, generate branch path based on node ID, and get the level of the node.

## Build Setup

``` bash
# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

```
## Setup

`npm install @dadcici/tree-utils --save`

## Simple usage

```javascript
import TreeUtils from ' @dadcici/tree-utils';

let list = [
  { id: 0, root: 'root' },
  { id: 1, name: 'name1', pid: 0 },
  { id: 2, name: 'name2', pid: 0 },
  { id: 3, name: 'name3', pid: 1 },
  { id: 4, name: 'name4', pid: 3 }
];

let tree = TreeUtils.list2Tree(list, 0);
```

## License

Copyright (c) 2018 by www.dadcici.com

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