parseGlob
parseGlob(
pattern,dialect?,limits?):GlobPattern
Defined in: packages/format-glob/src/parse-glob.ts:22
Parses pattern under dialect, within limits.
Constructs the dialect does not define are parsed as literal text rather than rejected, so a pattern written for a different tool degrades to an exact match instead of throwing. Outgrowing a bound is the one thing that does throw: past that point the cost has stopped being the author’s.
O(pattern length), except that the brace-expansion check walks the parsed tree once more.
Parameters
Section titled “Parameters”pattern
Section titled “pattern”string
dialect?
Section titled “dialect?”GlobDialect = "posix"
limits?
Section titled “limits?”Returns
Section titled “Returns”Throws
Section titled “Throws”If the pattern is longer than GlobLimits.maxPatternLength, nests braces or extglobs deeper than their bounds, or expands to more than GlobLimits.maxBraceProduct alternatives.