Blazing fast and accurate glob matcher written in JavaScript, with no dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.
83
Build a utility that validates file paths against inclusion and exclusion patterns, commonly used in build tools and configuration systems.
*.js and *.{ts,tsx} @testsrc/**/*.js @test@generates
/**
* Validates whether a file path should be included based on inclusion and exclusion patterns.
*
* @param {string} filePath - The file path to validate
* @param {string|string[]} includePatterns - Pattern(s) that files must match to be included
* @param {string|string[]} [excludePatterns] - Optional pattern(s) that exclude files from matching
* @returns {boolean} True if the path matches include patterns and doesn't match exclude patterns
*/
function validatePath(filePath, includePatterns, excludePatterns) {
// IMPLEMENTATION HERE
}
module.exports = { validatePath };Provides fast and accurate glob pattern matching capabilities.
Install with Tessl CLI
npx tessl i tessl/npm-picomatchevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10