Throughout my experience, I have utilized various tools designed to search a codebase for specific files and then carry out operations on those files. One example is test libraries that identify all the necessary files for execution. Another common tool is git, which manages files within its project directory.
Most of these software solutions include a feature similar to .gitignore, which utilizes a pattern matching system to easily specify which files or directories in a given location should be processed, and which should not.
The simplicity of the pattern matching system compared to regex (which might be overcomplicated) likely contributes to its speed and efficiency. Each file or directory being scanned in the directory structure needs to be checked against every possible pattern match in the ignore file.
In my TypeScript project, I aim to perform similar processing on multiple files in a directory tree. Currently, I am using fdir to traverse the directories. My question is, does the .gitignore-style pattern matching language have a specific name? Are there any TypeScript or JavaScript libraries available for implementing this pattern matching with optimal performance?