There is an edge case where the excludePath option is not sufficient to achieve the desired result.
For example say you were trying to list all of the directories in the current directory to carry out some process inside the selected one, naturally you would want to exclude .. If you do that however you exclude the current directory and thus all of the sub directories.
A proposal is to offer an excludeFilter option that expects a function to run for each item in the final result to decide if it should be filtered out.
There is an edge case where the
excludePath
option is not sufficient to achieve the desired result.For example say you were trying to list all of the directories in the current directory to carry out some process inside the selected one, naturally you would want to exclude
.
. If you do that however you exclude the current directory and thus all of the sub directories.A proposal is to offer an
excludeFilter
option that expects a function to run for each item in the final result to decide if it should be filtered out.