paths-tree-unist
Unist compatible paths-to-tree parser.
Last updated 2 months ago by tomasbonco .
MIT · Original npm · Tarball · package.json
$ cnpm install paths-tree-unist 
SYNC missed versions from official npm registry.

paths-tree-unist

I made this package, because I've seen a few solutions but none of them was universal enough. So this:

  • uses unist tree data structure (so you can use unist tools to traverse/modify it),
  • a node can contain multiple segments of the path,
  • allows to store custom data for any segment of the path,
  • has advanced logic for opening/closing the folders,
  • ES6 compatible module (provides also version for node).

So whether you are creating a simple tree representation, or VS Code's like advanced file browser this should help you a lot.

Parser

Can be used with as unist parser.

Manager

Class providing everything most user will need.

Currently under development/testing. Pretty stable. Currently, please check the unit tests to see how to use it.

Current Tags

  • 1.0.1                                ...           latest (2 months ago)

2 Versions

  • 1.0.1                                ...           2 months ago
  • 1.0.0                                ...           2 months ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (4)
Dev Dependencies (6)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |