Skip to content

Documentation / base / GlobMatcher

Class: GlobMatcher ​

Defined in: libs/base/src/vfs/vfs.ts:143

A matcher for glob patterns that converts wildcard patterns to regular expressions.

Constructors ​

Constructor ​

new GlobMatcher(pattern, caseSensitive?): GlobMatcher

Defined in: libs/base/src/vfs/vfs.ts:153

Creates a new glob pattern matcher.

Parameters ​

pattern ​

string

The glob pattern to match

caseSensitive? ​

boolean = true

Whether matching should be case sensitive

Returns ​

GlobMatcher

Methods ​

test() ​

test(path): boolean

Defined in: libs/base/src/vfs/vfs.ts:161

Test if a path is a match pattern

Parameters ​

path ​

string

Returns ​

boolean


getPattern() ​

getPattern(): string

Defined in: libs/base/src/vfs/vfs.ts:168

Get original match pattern

Returns ​

string

Released under the MIT License.