# tree-operations

> create a tree from an array of objects or a flat array from tree, and others operations on tree

Latest version **0.9.4** (published 2018-04-13) · MIT license · 0 weekly downloads

## Install

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

## 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.9.4 |
| Published | 2018-04-13 |
| First published | 2018-02-12 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 30.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Sylvain Longepée |
| Maintainers | sylvain59 |
| Keywords | tree, flatten, unflatten, find, recursive, filter node, order nodes |

## Links

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

## Dependencies (1)

- [find-polyfill](https://npm.io/package/find-polyfill.md) ^1.0.1

## Recent versions

- 0.9.4 (latest) — 2018-04-13
- 0.9.3 — 2018-04-13
- 0.9.2 — 2018-03-07
- 0.9.1 — 2018-02-13
- 0.9.0 — 2018-02-12
- 0.0.1 — 2018-02-12

## README

# tree-operations

<div style="display:inline">

[![build](https://travis-ci.org/Sylvain59650/tree-operations.png?branch=master)](https://travis-ci.org/Sylvain59650/tree-operations)
![version](https://img.shields.io/npm/v/tree-operations.svg)
![package](https://img.shields.io/github/package-json/v/Sylvain59650/tree-operations.svg)
![dependencies](https://img.shields.io/david/Sylvain59650/tree-operations.svg)
![minified](https://img.shields.io/bundlephobia/min/tree-operations.svg)
![linter](https://img.shields.io/badge/eslint-ok-blue.svg)
![tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)
![license](https://img.shields.io/npm/l/tree-operations.svg)
[![hits](http://hits.dwyl.com/Sylvain59650/tree-operations.svg)](http://hits.dwyl.com/Sylvain59650/tree-operations)
</div>

 <div class="Note" style="color:orange;font-style:italic">
 
  The lastest version of this document is available on [Github > tree-operations](https://github.com/Sylvain59650/tree-operations/blob/master/README.md)
</div>

## Availables operations
- [fromArray](https://github.com/Sylvain59650/tree-operations/blob/master/docs/tutorial.md#fromarray) : create a tree from an array of objects
- [toFlatArray](https://github.com/Sylvain59650/tree-operations/blob/master/docs/tutorial.md#toFlatArray) : create a flat list from an tree 
- [find](https://github.com/Sylvain59650/tree-operations/blob/master/docs/tutorial.md#find) : find a node in a tree
- [selectNew](https://github.com/Sylvain59650/tree-operations/blob/master/docs/tutorial.md#selectnew) : filters the properties of the nodes of the tree
- [orderBy](https://github.com/Sylvain59650/tree-operations/blob/master/docs/tutorial.md#orderby) : order the leaves of the tree respecting the structure of the tree
## Installation

    npm install tree-operations --save

or

    yarn add tree-operations --save


## prerequisites

### for NodeJs
     var TreeOps=require("tree-operations");

### for browser

    <script src="node_modules/find-polyfill/distrib/find-polyfill.min.js"></script>
 
    <script src="node_modules/tree-operations/distrib/tree-operations.min.js"></script>

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