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%
Builds a curried matcher from mixed criteria and reuses it for repeated filtering of path-like strings.
src/utils/file.js and false for non-matching entries like README.md, even when reused across multiple invocations. @testreturnIndex yields the index of the first matching matcher (e.g., 1 for a regex hit) or -1 when nothing matches. @test@generates
/**
* Builds a reusable matcher from a list of matchers and optional glob options.
* @param {Array<string|RegExp|Function>|string|RegExp|Function} matchers
* @param {object} [options]
* @returns {(value: string|string[], returnIndex?: boolean) => boolean|number}
*/
export function createReusableTester(matchers, options);
/**
* Filters a list of values using a reusable tester; when returnIndex is true it maps to matcher indices instead of values.
* @param {Array<string|string[]>} values
* @param {(value: string|string[], returnIndex?: boolean) => boolean|number} tester
* @param {boolean} [returnIndex]
* @returns {Array<string|number>}
*/
export function filterWithTester(values, tester, returnIndex);Provides curried matcher generation for strings, globs, regexes, and predicate functions.