tree-operations
The lastest version of this document is available on Github > tree-operations
Availables operations
- fromArray : create a tree from an array of objects
- toFlatArray : create a flat list from an tree
- find : find a node in a tree
- selectNew : filters the properties of the nodes of the tree
- 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>