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%
Normalize mixed-separator file system paths while preserving trailing separators so directory-aware include/exclude rules behave consistently across platforms.
["tmp\\logs\\", "tmp\\logs\\error.log"] and include patterns ["tmp/**/"], only the normalized directory entry ["tmp/logs/"] is kept because the trailing separator is preserved while the file without a trailing separator is ignored. @test["*/"] and no excludes, candidates ["logs/", "logs.txt", "logs\\archive\\"] resolve to ["logs/", "logs/archive/"]; the directory-only glob matches normalized entries ending in a separator and skips similarly named files. @test["src/**"] and exclude patterns ["**/node_modules/"], candidates ["src/index.js", "src\\node_modules\\", "src\\node_modules\\leftpad\\index.js"] resolve to ["src/index.js"] because the normalized directory entries with trailing separators match the exclusion glob. @test@generates
export interface PathSelectionOptions {
include?: Array<string | RegExp>;
exclude?: Array<string | RegExp>;
}
/**
* Returns the subset of candidate paths that pass include/exclude rules.
* Paths are normalized to forward slashes while preserving any trailing separator from the input.
* When include is omitted all candidates start as matched; excludes are applied afterward without reordering results.
*/
export function selectPaths(
candidates: string[],
options?: PathSelectionOptions
): string[];Match mixed-separator paths against string, glob, or regex criteria while preserving trailing separators for directory-aware patterns.