https://github.com/open-node/tree-tree
https://github.com/open-node/tree-tree
cli-app tree treeview
Last synced: 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/open-node/tree-tree
- Owner: open-node
- Created: 2016-11-03T01:17:05.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-11-05T13:38:54.000Z (over 8 years ago)
- Last Synced: 2025-04-02T20:05:53.206Z (3 months ago)
- Topics: cli-app, tree, treeview
- Language: JavaScript
- Size: 2.93 KB
- Stars: 14
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tree-tree
## Usage
npm install tree-tree --save## Example
```js
var tree = require('tree-tree');
var data = {
name: 'Results',
children: [{
name: '宝马',
children: [{
name: '3系'
}, {
name: '5系'
}, {
name: '7系'
}]
}, {
name: '奔驰',
children: [{
name: 'SUV'
}, {
name: '轿车'
}]
}]
};
console.log(tree(data));
/** Output
Results
├── 宝马
│ ├── 3系
│ ├── 5系
│ └── 7系
└── 奔驰
├── SUV
└── 轿车
*/
```