Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/afeiship/next-tree-walk
Tree data walker.
https://github.com/afeiship/next-tree-walk
loop next recursive tree walk
Last synced: 8 days ago
JSON representation
Tree data walker.
- Host: GitHub
- URL: https://github.com/afeiship/next-tree-walk
- Owner: afeiship
- License: mit
- Created: 2019-11-27T11:44:25.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-06T14:46:35.000Z (over 1 year ago)
- Last Synced: 2024-11-15T08:04:43.929Z (about 1 month ago)
- Topics: loop, next, recursive, tree, walk
- Language: JavaScript
- Size: 36.1 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# next-tree-walk
> Tree data walker.[![version][version-image]][version-url]
[![license][license-image]][license-url]
[![size][size-image]][size-url]
[![download][download-image]][download-url]## installation
```bash
npm install -S @jswork/next-tree-walk
```## usage
```js
import '@jswork/next-tree-walk';class MyComponent extends React.Component{
get childView(){
const { items, itemsKey, template } = this.props;
return nx.treeWalk(items, { template, itemsKey: 'children' });
}render(){
return (
{this.childView}
)
}
}
```## license
Code released under [the MIT license](https://github.com/afeiship/next-tree-walk/blob/master/LICENSE.txt).[version-image]: https://img.shields.io/npm/v/@jswork/next-tree-walk
[version-url]: https://npmjs.org/package/@jswork/next-tree-walk[license-image]: https://img.shields.io/npm/l/@jswork/next-tree-walk
[license-url]: https://github.com/afeiship/next-tree-walk/blob/master/LICENSE.txt[size-image]: https://img.shields.io/bundlephobia/minzip/@jswork/next-tree-walk
[size-url]: https://github.com/afeiship/next-tree-walk/blob/master/dist/next-tree-walk.min.js[download-image]: https://img.shields.io/npm/dm/@jswork/next-tree-walk
[download-url]: https://www.npmjs.com/package/@jswork/next-tree-walk