Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mbovel/ts-tree
A basic tree class for javascript/typescript
https://github.com/mbovel/ts-tree
Last synced: 2 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 (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-10-17T19:26:36.000Z (about 6 years ago)
- Last Synced: 2024-09-17T15:17:45.049Z (4 months ago)
- Language: TypeScript
- Homepage:
- Size: 53.7 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# TS-Tree [![npm version](https://badge.fury.io/js/ts-tree.svg)](https://badge.fury.io/js/ts-tree) [![Build Status](https://travis-ci.org/mbovel/ts-tree.svg?branch=master)](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)