CtrlK
CommunityDocumentationLog inGet started
Tessl Logo

tessl/npm-anymatch

tessl install tessl/npm-anymatch@3.1.0

Matches 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%

task.mdevals/scenario-6/

Hidden-Aware Path Filter

Build a small path-filtering helper that combines include/exclude matchers with glob-engine options so callers can opt into matching hidden paths or case-insensitive globs. The filter should be lightweight and reusable.

Capabilities

Default hidden handling

  • Filtering [".env", "configs/.env", "configs/visible.env"] with include matcher "**/*.env" and no explicit glob options returns only configs/visible.env. Hidden-dot segments are ignored by default. @test

Opt-in hidden matching

  • Filtering the same paths with include matcher "**/*.env" and glob options enabling dotfile matching returns [".env", "configs/.env", "configs/visible.env"]. @test

Case-insensitive glob option

  • Filtering ["README.MD", "readme.md", "docs/readme.md"] with include matcher "**/readme.md" and a case-insensitive glob option returns all three entries. @test

Implementation

@generates

API

/**
 * Builds a reusable predicate that decides whether a path should be kept.
 *
 * @param {Array<string|RegExp|Function>} matchers - include/exclude matchers; negated globs start with '!'.
 * @param {object} [globOptions] - forwarded to the underlying glob matcher for behaviors like dotfile or case handling.
 * @returns {(path: string) => boolean} predicate that returns true when the path matches the include/exclude rules.
 */
function createPathFilter(matchers, globOptions) {}

Dependencies { .dependencies }

Path matcher { .dependency }

Supports string, glob, regexp, and function matchers while passing picomatch options (e.g., dot, nocase) through to glob handling. @satisfied-by

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
npmpkg:npm/anymatch@3.1.x
tile.json