node-directory-tree
node-directory-tree copied to clipboard
Feature request - Free text search
Thanks for creating this package which works great!
Is a search-function in the pipeline?
Could be something like this:
.search("search_for_this_string", nodeArray[]): nodes[]
Hello, not sure this fits in the scope of the project. You should be able to write a function that walks the tree and uses a fuzzy search library to achieve this. What do you think?
Sure - i can write it myselft but i just think it would be a nice feature in this library. It's something that i would be a lot of developers using this library would want to have right out of the box.
Sounds kind of like a different library. At most perhaps the filtering functionality could be extended to support file name patterns rather than just extensions?
Sure! Like i wrote in the title i would go for a "free text search" and it could also be a regex possibility. This would search on all the properties on each node.
Is there a filter functionality present today?
There is extension filtering as you can see in the readme.
Ah - yes - i already use that one and it works great.