node-directory-tree icon indicating copy to clipboard operation
node-directory-tree copied to clipboard

Add parsing such as dree

Open euberdeveloper opened this issue 3 years ago • 3 comments

Hi,

first of all I want to thank you, because for parts of a similar library I have done I took inspiration by your json result

In my implementation, dree I have also added a parse function (in addition to other functionalities`, which prints the directory tree as a human-readable tree

Do you think you could implement it also in this library? I think it would be useful, especially when generating directory trees in markdown files

euberdeveloper avatar Jan 07 '22 22:01 euberdeveloper

Hi, I'm not sure what you mean with parse. What would it do?

mihneadb avatar Jan 13 '22 21:01 mihneadb

It creates a string like this:

image

Of course just by the name was it difficult to guess, it is described in the documentation

euberdeveloper avatar Jan 13 '22 22:01 euberdeveloper

Oh, so you mean serialize a directory as a string.

mihneadb avatar Jan 13 '22 22:01 mihneadb