https://github.com/mbovel/ts-tree
A basic tree class for javascript/typescript
https://github.com/mbovel/ts-tree
Last synced: 4 months ago
JSON representation
A basic tree class for javascript/typescript
- Host: GitHub
- URL: https://github.com/mbovel/ts-tree
- Owner: mbovel
- License: mit
- Created: 2018-08-20T13:11:41.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T19:26:36.000Z (over 6 years ago)
- Last Synced: 2025-03-18T15:12:52.958Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 53.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TS-Tree [](https://badge.fury.io/js/ts-tree) [](https://travis-ci.org/mbovel/ts-tree)
TS-Tree is a tiny tree data structure written in Typescript.
## Installation
```
$ npm install --save ts-tree
```## Usage
### Javascript
```javascript
const Tree = require('ts-tree').Tree;
```### Typescript
```typescript
import { Tree } from 'ts-tree';
```**Note:** for this to work, the tsc option `--moduleResolution` must be set to `Node` (see https://github.com/Microsoft/TypeScript/issues/7984 for more details).
## Similar work
- [undom](https://github.com/developit/undom)
- [easy-tree](https://github.com/nylen/easy-tree)