tessl install tessl/npm-anymatch@3.1.0Matches strings against configurable strings, globs, regular expressions, and/or functions
Agent Success
Agent success rate when using this tile
76%
Improvement
Agent success rate improvement when using this tile compared to baseline
1.12x
Baseline
Agent success rate without this tile
68%
Build a small utility that filters file paths using positive and negated glob patterns, so that explicit exclusions override broad include rules.
["src/**/*.js", "!src/**/__tests__/**"] and candidates ["src/index.js", "src/__tests__/unit.js", "README.md"], the filtered result keeps only ["src/index.js"]. @test["src/vendor/**/*.js", "!src/vendor/internal/**"] and candidates ["src/vendor/internal/secret.js", "src/vendor/public.js"], the filter removes any path matched by a negated glob even when it also matches a broader include, returning only ["src/vendor/public.js"]. @test["logs/app.log", "logs/tmp/cache.tmp"] with patterns ["logs/**/*.log", "!**/tmp/**"] keeps only ["logs/app.log"]. @test@generates
/**
* Returns a filtered list of candidate paths that match at least one positive glob and are not excluded by any negated glob.
*/
export function filterPaths(paths, patterns);
/**
* Returns a predicate function that tests a single path using the provided patterns.
* The predicate must respect negated globs overriding matches and be suitable for repeated calls.
*/
export function buildPathFilter(patterns);Matches paths against glob patterns, including negated exclusions, to power the filter predicate.