Skip to content

Variable: GLOB_PATTERN ​

ts
const GLOB_PATTERN: Regex<"^(?<lead>\\*{1,2})/(?<middle>.*?)/(?<trail>\\*{1,2})$", {
  flags: "u";
  names: {
     lead: string;
     middle: string;
     trail: string;
  };
}>;

Defined in: packages/regex/src/tiers/cssdoc-local.ts:97

Configuration Glob Pattern Matches glob patterns with leading/trailing wildcards and middle path. Used for file configuration matching.

Example patterns:

  • *slash*slash*components*slash** (escaped: */components/**)
  • src*slash***slash*.css (escaped: src/**/*.css)

Example ​

ts
GLOB_PATTERN.exec("*slash*slash*components*slash**")?.groups
// Returns { lead: "**", middle: "components", trail: "**" }

Released under the MIT License