Skip to main content
path.PlatformPath.matchesGlob - path - Node documentation
method path.PlatformPath.matchesGlob

Usage in Deno

import { type path } from "node:path";
PlatformPath.matchesGlob(
path: string,
pattern: string,
): boolean

The path.matchesGlob() method determines if path matches the pattern.

Parameters

path: string

The path to glob-match against.

pattern: string

The glob to check the path against.

Return Type

boolean

Whether or not the path matched the pattern.

Throws

TypeError

if path or pattern are not strings.