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 helper that filters path-like strings using mixed matching rules.
"logs/app.log" matches when matchers include that exact string. @test"src/utils/math.js" matches when matchers include the glob "src/**/*.js". @test"README.md" matches when matchers include a regular expression anchored to "^README". @test"server.js" matches when matchers include a predicate that returns true for values containing "server". @test["src/index.js", "docs/guide.md", "scripts/build.mjs"] and matchers ["src/**/*.js", /\.md$/], returns ["src/index.js", "docs/guide.md"] preserving order. @test@generates
/**
* Returns entries from `inputs` that satisfy at least one matcher.
* @param {string[]} inputs
* @param {string|RegExp|Function|(string|RegExp|Function)[]} matchers
* @returns {string[]}
*/
export function filterMatches(inputs, matchers);inputs is an array of strings to test.matchers is a string, a glob string, a RegExp, a predicate function (value) => boolean, or an array combining them.inputs that satisfy at least one matcher.Provides string, glob, regex, and predicate-based matching.