https://github.com/neovici/cosmoz-treenode
Utility class to manipulate a tree data structure.
https://github.com/neovici/cosmoz-treenode
Last synced: about 1 year ago
JSON representation
Utility class to manipulate a tree data structure.
- Host: GitHub
- URL: https://github.com/neovici/cosmoz-treenode
- Owner: Neovici
- Created: 2017-04-26T09:36:07.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-04-05T16:33:32.000Z (about 1 year ago)
- Last Synced: 2025-04-05T17:29:45.707Z (about 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 3.42 MB
- Stars: 0
- Watchers: 6
- Forks: 3
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# \
[](https://github.com/Neovici/cosmoz-treenode/actions?workflow=Github+CI)
[](https://github.com/semantic-release/semantic-release)
A web component to display a node in a tree data structure. Written in TypeScript using PionJS.
## Features
- Display a path to a node in a tree structure
- Control display options like maximum nodes to show
- Hide parts of the path from the root
- Customizable separator between path parts
- Fallback text when a path cannot be found
## Installation
```bash
npm install @neovici/cosmoz-treenode
```
## Usage
```html
```
## Scripts
- `npm start` - Starts Storybook development server at port 8000
- `npm run build` - Builds the TypeScript source files
- `npm run build:watch` - Watches and builds TypeScript files
- `npm test` - Runs tests with coverage
- `npm run test:watch` - Runs tests in watch mode
- `npm run storybook:build` - Builds Storybook for production
- `npm run storybook:preview` - Builds and previews Storybook
## Development
This component is written in TypeScript. The source files are in the `src/` directory.
### Development workflow
1. Clone the repository
2. Install dependencies: `npm ci`
3. Start Storybook: `npm start`
### Testing
Run tests:
```bash
npm test
```
Run tests in watch mode:
```bash
npm run test:watch
```
## License
Apache-2.0