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%
Utility for evaluating strings or path-like inputs against mixed matcher definitions, with results available as a boolean or as the index of the first match.
true when any matcher applies and false otherwise. @test-1 when nothing matches. @testArray.prototype.filter callback to keep only matching entries in boolean mode. @test@generates
/**
* Checks whether the provided value satisfies any matcher.
*
* @param {Array<string|RegExp|Function>|string|RegExp|Function} matchers - Single matcher or list of matcher definitions.
* @param {string|any[]} value - A string to test, or an array where the first element is tested and the rest are forwarded to function matchers.
* @param {{ mode?: 'boolean' | 'index' }} [options] - Controls whether the result is a boolean or a match index.
* @returns {boolean|number} Boolean by default; when mode is "index" returns the index of the first matching matcher or -1.
*/
export function checkMatch(matchers, value, options);
/**
* Creates a reusable tester for the provided matchers.
*
* @param {Array<string|RegExp|Function>|string|RegExp|Function} matchers - Matcher definitions.
* @returns {(value: string|any[], options?: { mode?: 'boolean' | 'index' }) => boolean|number} Tester usable directly or as a filter callback.
*/
export function createMatchTester(matchers);Provides matcher evaluation with support for boolean or index-style results.
@satisfied-by