# node-data-tree

> A library to model tree structures in node js

Latest version **0.1.0** (published 2022-04-08) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-data-tree
pnpm add node-data-tree
yarn add node-data-tree
bun add node-data-tree
```

## 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.1.0 |
| Published | 2022-04-08 |
| First published | 2022-03-10 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 41.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Joshua Dietz |
| Maintainers | dtz |
| Keywords | tree, nodes |

## Links

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

## Recent versions

- 0.1.0 (latest) — 2022-04-08
- 0.0.3 — 2022-03-10
- 0.0.2 — 2022-03-10
- 0.0.1 — 2022-03-10

## README

# node-data-tree
A library to implement tree-like structures in node.js

Note that this library is *not* extensively tested (look at the tests) and is not feature-complete either. For now, I just implemented the features that I needed.

Usage:
------
For a more detailed function overview please take a look at the jsdoc comments in Tree.ts and TreeNode.ts
### Installation

    npm i --save node-data-tree
### Example
    import {Tree, TreeNode} from 'node-data-tree'

    let tree = Tree.parse({
        nodeData : {
            someData : "some String"
        },
        children : [
            {
                nodeData : {
                    someOtherData : 42
                }
            }
        ]
    })

    let anotherNode = Tree.parse({nodeData : {someMoreData : "xyz"}})

    tree.addChild(anotherNode)

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