Click to expand

\doxysection*{Picomatch}



\href{https://npmjs.org/package/picomatch}{\texttt{  }} \href{https://github.com/micromatch/picomatch/actions?workflow=Tests}{\texttt{  }} \href{https://coveralls.io/github/micromatch/picomatch}{\texttt{  }} \href{https://npmjs.org/package/picomatch}{\texttt{  }} 

~\newline
 ~\newline




{\bfseries{Blazing fast and accurate glob matcher written in Java\+Script.}} {\itshape No dependencies and full support for standard and extended Bash glob features, including braces, extglobs, POSIX brackets, and regular expressions.} 

~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20352}{}\doxysubsection{Why picomatch?}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20352}

\begin{DoxyItemize}
\item {\bfseries{Lightweight}} -\/ No dependencies
\item {\bfseries{Minimal}} -\/ Tiny API surface. Main export is a function that takes a glob pattern and returns a matcher function.
\item {\bfseries{Fast}} -\/ Loads in about 2ms (that\textquotesingle{}s several times faster than a \href{http://www.endmemo.com/sconvert/framespersecondframespermillisecond.php}{\texttt{ single frame of a HD movie}} at 60fps)
\item {\bfseries{Performant}} -\/ Use the returned matcher function to speed up repeat matching (like when watching files)
\item {\bfseries{Accurate matching}} -\/ Using wildcards ({\ttfamily $\ast$} and {\ttfamily ?}), globstars ({\ttfamily $\ast$$\ast$}) for nested directories, \href{\#advanced-globbing}{\texttt{ advanced globbing}} with extglobs, braces, and POSIX brackets, and support for escaping special characters with {\ttfamily \textbackslash{}} or quotes.
\item {\bfseries{Well tested}} -\/ Thousands of unit tests
\end{DoxyItemize}

See the \href{\#library-comparisons}{\texttt{ library comparison}} to other libraries.

~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20353}{}\doxysubsection{Table of Contents}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20353}
$<$details$>$ 


\begin{DoxyItemize}
\item \href{\#install}{\texttt{ Install}}
\item \href{\#usage}{\texttt{ Usage}}
\item \href{\#api}{\texttt{ API}}
\begin{DoxyItemize}
\item \href{\#picomatch}{\texttt{ picomatch}}
\item \href{\#test}{\texttt{ .test}}
\item \href{\#matchbase}{\texttt{ .match\+Base}}
\item \href{\#ismatch}{\texttt{ .is\+Match}}
\item \href{\#parse}{\texttt{ .parse}}
\item \href{\#scan}{\texttt{ .scan}}
\item \href{\#compilere}{\texttt{ .compile\+Re}}
\item \href{\#toregex}{\texttt{ .to\+Regex}}
\end{DoxyItemize}
\item \href{\#options}{\texttt{ Options}}
\begin{DoxyItemize}
\item \href{\#picomatch-options}{\texttt{ Picomatch options}}
\item \href{\#scan-options}{\texttt{ Scan Options}}
\item \href{\#options-examples}{\texttt{ Options Examples}}
\end{DoxyItemize}
\item \href{\#globbing-features}{\texttt{ Globbing features}}
\begin{DoxyItemize}
\item \href{\#basic-globbing}{\texttt{ Basic globbing}}
\item \href{\#advanced-globbing}{\texttt{ Advanced globbing}}
\item \href{\#braces}{\texttt{ Braces}}
\item \href{\#matching-special-characters-as-literals}{\texttt{ Matching special characters as literals}}
\end{DoxyItemize}
\item \href{\#library-comparisons}{\texttt{ Library Comparisons}}
\item \href{\#benchmarks}{\texttt{ Benchmarks}}
\item \href{\#philosophies}{\texttt{ Philosophies}}
\item \href{\#about}{\texttt{ About}}
\begin{DoxyItemize}
\item \href{\#author}{\texttt{ Author}}
\item \href{\#license}{\texttt{ License}}
\end{DoxyItemize}
\end{DoxyItemize}

\+\_\+(TOC generated by \href{https://github.com/verbose/verb}{\texttt{ verb}} using \href{https://github.com/jonschlinkert/markdown-toc}{\texttt{ markdown-\/toc}})\+\_\+

$<$/details$>$

~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20354}{}\doxysubsection{Install}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20354}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm install -\/-\/save picomatch }

\end{DoxyCode}


~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20355}{}\doxysubsection{Usage}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20355}
The main export is a function that takes a glob pattern and an options object and returns a function for matching strings.


\begin{DoxyCode}{0}
\DoxyCodeLine{const pm = require('picomatch');}
\DoxyCodeLine{const isMatch = pm('*.js');}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(isMatch('abcd')); //=> false}
\DoxyCodeLine{console.log(isMatch('a.js')); //=> true}
\DoxyCodeLine{console.log(isMatch('a.md')); //=> false}
\DoxyCodeLine{console.log(isMatch('a/b.js')); //=> false }

\end{DoxyCode}


~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20356}{}\doxysubsection{API}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20356}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20357}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L32\char`\"{}$>$picomatch$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20357}
Creates a matcher function from one or more glob patterns. The returned function takes a string to match as its first argument, and returns true if the string is a match. The returned matcher function also takes a boolean as the second argument that, when true, returns an object with additional information.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily globs} $\ast$$\ast$\{String$\vert$\+Array\}$\ast$$\ast$\+: One or more glob patterns.
\item {\ttfamily options} $\ast$$\ast$\{Object=\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Function=\}$\ast$$\ast$\+: Returns a matcher function.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{// picomatch(glob[, options]);}
\DoxyCodeLine{}
\DoxyCodeLine{const isMatch = picomatch('*.!(*a)');}
\DoxyCodeLine{console.log(isMatch('a.a')); //=> false}
\DoxyCodeLine{console.log(isMatch('a.b')); //=> true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20358}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L117\char`\"{}$>$.\+test$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20358}
Test {\ttfamily input} with the given {\ttfamily regex}. This is used by the main {\ttfamily picomatch()} function to test the input string.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily input} $\ast$$\ast$\{String\}$\ast$$\ast$\+: String to test.
\item {\ttfamily regex} $\ast$$\ast$\{Reg\+Exp\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns an object with matching info.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{// picomatch.test(input, regex[, options]);}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(picomatch.test('foo/bar', /\string^(?:([\string^/]*?)\(\backslash\)/([\string^/]*?))\$/));}
\DoxyCodeLine{// \{ isMatch: true, match: [ 'foo/', 'foo', 'bar' ], output: 'foo/bar' \} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20359}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L161\char`\"{}$>$.\+match\+Base$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20359}
Match the basename of a filepath.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily input} $\ast$$\ast$\{String\}$\ast$$\ast$\+: String to test.
\item {\ttfamily glob} $\ast$$\ast$\{Reg\+Exp$\vert$\+String\}$\ast$$\ast$\+: Glob pattern or regex created by \href{\#makeRe}{\texttt{ .make\+Re}}.
\item {\ttfamily returns} $\ast$$\ast$\{Boolean\}$\ast$$\ast$
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{// picomatch.matchBase(input, glob[, options]);}
\DoxyCodeLine{console.log(picomatch.matchBase('foo/bar.js', '*.js'); // true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20360}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L183\char`\"{}$>$.\+is\+Match$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20360}
Returns true if {\bfseries{any}} of the given glob {\ttfamily patterns} match the specified {\ttfamily string}.

{\bfseries{Params}}


\begin{DoxyItemize}
\item $\ast$$\ast$\{String$\vert$\+Array\}$\ast$$\ast$\+: str The string to test.
\item $\ast$$\ast$\{String$\vert$\+Array\}$\ast$$\ast$\+: patterns One or more glob patterns to use for matching.
\item $\ast$$\ast$\{Object\}$\ast$$\ast$\+: See available \href{\#options}{\texttt{ options}}.
\item {\ttfamily returns} $\ast$$\ast$\{Boolean\}$\ast$$\ast$\+: Returns true if any patterns match {\ttfamily str}
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{// picomatch.isMatch(string, patterns[, options]);}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(picomatch.isMatch('a.a', ['b.*', '*.a'])); //=> true}
\DoxyCodeLine{console.log(picomatch.isMatch('a.a', 'b.*')); //=> false }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20361}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L199\char`\"{}$>$.\+parse$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20361}
Parse a glob pattern to create the source string for a regular expression.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily pattern} $\ast$$\ast$\{String\}$\ast$$\ast$
\item {\ttfamily options} $\ast$$\ast$\{Object\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns an object with useful properties and output to be used as a regex source string.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{const result = picomatch.parse(pattern[, options]); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20362}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L231\char`\"{}$>$.\+scan$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20362}
Scan a glob pattern to separate the pattern into segments.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily input} $\ast$$\ast$\{String\}$\ast$$\ast$\+: Glob pattern to scan.
\item {\ttfamily options} $\ast$$\ast$\{Object\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: Returns an object with
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{// picomatch.scan(input[, options]);}
\DoxyCodeLine{}
\DoxyCodeLine{const result = picomatch.scan('!./foo/*.js');}
\DoxyCodeLine{console.log(result);}
\DoxyCodeLine{\{ prefix: '!./',}
\DoxyCodeLine{  input: '!./foo/*.js',}
\DoxyCodeLine{  start: 3,}
\DoxyCodeLine{  base: 'foo',}
\DoxyCodeLine{  glob: '*.js',}
\DoxyCodeLine{  isBrace: false,}
\DoxyCodeLine{  isBracket: false,}
\DoxyCodeLine{  isGlob: true,}
\DoxyCodeLine{  isExtglob: false,}
\DoxyCodeLine{  isGlobstar: false,}
\DoxyCodeLine{  negated: true \} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20363}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L250\char`\"{}$>$.\+compile\+Re$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20363}
Create a regular expression from a parsed glob pattern.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily state} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The object returned from the {\ttfamily .parse} method.
\item {\ttfamily options} $\ast$$\ast$\{Object\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Reg\+Exp\}$\ast$$\ast$\+: Returns a regex created from the given pattern.
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{const state = picomatch.parse('*.js');}
\DoxyCodeLine{// picomatch.compileRe(state[, options]);}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(picomatch.compileRe(state));}
\DoxyCodeLine{//=> /\string^(?:(?!\(\backslash\).)(?=.)[\string^/]*?\(\backslash\).js)\$/ }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20364}{}\doxysubsubsection{$<$a href=\char`\"{}lib/picomatch.\+js\#\+L318\char`\"{}$>$.\+to\+Regex$<$/a$>$}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20364}
Create a regular expression from the given regex source string.

{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily source} $\ast$$\ast$\{String\}$\ast$$\ast$\+: Regular expression source string.
\item {\ttfamily options} $\ast$$\ast$\{Object\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Reg\+Exp\}$\ast$$\ast$
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{// picomatch.toRegex(source[, options]);}
\DoxyCodeLine{}
\DoxyCodeLine{const \{ output \} = picomatch.parse('*.js');}
\DoxyCodeLine{console.log(picomatch.toRegex(output));}
\DoxyCodeLine{//=> /\string^(?:(?!\(\backslash\).)(?=.)[\string^/]*?\(\backslash\).js)\$/ }

\end{DoxyCode}


~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20365}{}\doxysubsection{Options}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20365}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20366}{}\doxysubsubsection{Picomatch options}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20366}
The following options may be used with the main {\ttfamily picomatch()} function or any of the methods on the picomatch API.

\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Option}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Type}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Default value}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-4}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Option}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Type}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Default value}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-4}
\endhead
{\ttfamily basename}   &{\ttfamily boolean}   &{\ttfamily false}   &If set, then patterns without slashes will be matched against the basename of the path if it contains slashes. For example, {\ttfamily a?b} would match the path {\ttfamily /xyz/123/acb}, but not {\ttfamily /xyz/acb/123}.    \\\cline{1-4}
{\ttfamily bash}   &{\ttfamily boolean}   &{\ttfamily false}   &Follow bash matching rules more strictly -\/ disallows backslashes as escape characters, and treats single stars as globstars ({\ttfamily $\ast$$\ast$}).    \\\cline{1-4}
{\ttfamily capture}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Return regex matches in supporting methods.    \\\cline{1-4}
{\ttfamily contains}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Allows glob to match any part of the given string(s).    \\\cline{1-4}
{\ttfamily cwd}   &{\ttfamily string}   &{\ttfamily process.\+cwd()}   &Current working directory. Used by {\ttfamily picomatch.\+split()}    \\\cline{1-4}
{\ttfamily debug}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Debug regular expressions when an error is thrown.    \\\cline{1-4}
{\ttfamily dot}   &{\ttfamily boolean}   &{\ttfamily false}   &Enable dotfile matching. By default, dotfiles are ignored unless a {\ttfamily .} is explicitly defined in the pattern, or {\ttfamily options.\+dot} is true    \\\cline{1-4}
{\ttfamily expand\+Range}   &{\ttfamily function}   &{\ttfamily undefined}   &Custom function for expanding ranges in brace patterns, such as {\ttfamily \{a..z\}}. The function receives the range values as two arguments, and it must return a string to be used in the generated regex. It\textquotesingle{}s recommended that returned strings be wrapped in parentheses.    \\\cline{1-4}
{\ttfamily failglob}   &{\ttfamily boolean}   &{\ttfamily false}   &Throws an error if no matches are found. Based on the bash option of the same name.    \\\cline{1-4}
{\ttfamily fastpaths}   &{\ttfamily boolean}   &{\ttfamily true}   &To speed up processing, full parsing is skipped for a handful common glob patterns. Disable this behavior by setting this option to {\ttfamily false}.    \\\cline{1-4}
{\ttfamily flags}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Regex flags to use in the generated regex. If defined, the {\ttfamily nocase} option will be overridden.    \\\cline{1-4}
\href{\#optionsformat}{\texttt{ format}}   &{\ttfamily function}   &{\ttfamily undefined}   &Custom function for formatting the returned string. This is useful for removing leading slashes, converting Windows paths to Posix paths, etc.    \\\cline{1-4}
{\ttfamily ignore}   &{\ttfamily array\textbackslash{}$\vert$string}   &{\ttfamily undefined}   &One or more glob patterns for excluding strings that should not be matched from the result.    \\\cline{1-4}
{\ttfamily keep\+Quotes}   &{\ttfamily boolean}   &{\ttfamily false}   &Retain quotes in the generated regex, since quotes may also be used as an alternative to backslashes.    \\\cline{1-4}
{\ttfamily literal\+Brackets}   &{\ttfamily boolean}   &{\ttfamily undefined}   &When {\ttfamily true}, brackets in the glob pattern will be escaped so that only literal brackets will be matched.    \\\cline{1-4}
{\ttfamily lookbehinds}   &{\ttfamily boolean}   &{\ttfamily true}   &Support regex positive and negative lookbehinds. Note that you must be using Node 8.\+1.\+10 or higher to enable regex lookbehinds.    \\\cline{1-4}
{\ttfamily match\+Base}   &{\ttfamily boolean}   &{\ttfamily false}   &Alias for {\ttfamily basename}    \\\cline{1-4}
{\ttfamily max\+Length}   &{\ttfamily boolean}   &{\ttfamily 65536}   &Limit the max length of the input string. An error is thrown if the input string is longer than this value.    \\\cline{1-4}
{\ttfamily nobrace}   &{\ttfamily boolean}   &{\ttfamily false}   &Disable brace matching, so that {\ttfamily \{a,b\}} and {\ttfamily \{1..3\}} would be treated as literal characters.    \\\cline{1-4}
{\ttfamily nobracket}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Disable matching with regex brackets.    \\\cline{1-4}
{\ttfamily nocase}   &{\ttfamily boolean}   &{\ttfamily false}   &Make matching case-\/insensitive. Equivalent to the regex {\ttfamily i} flag. Note that this option is overridden by the {\ttfamily flags} option.    \\\cline{1-4}
{\ttfamily nodupes}   &{\ttfamily boolean}   &{\ttfamily true}   &Deprecated, use {\ttfamily nounique} instead. This option will be removed in a future major release. By default duplicates are removed. Disable uniquification by setting this option to false.    \\\cline{1-4}
{\ttfamily noext}   &{\ttfamily boolean}   &{\ttfamily false}   &Alias for {\ttfamily noextglob}    \\\cline{1-4}
{\ttfamily noextglob}   &{\ttfamily boolean}   &{\ttfamily false}   &Disable support for matching with extglobs (like {\ttfamily +(a\textbackslash{}$\vert$b)})    \\\cline{1-4}
{\ttfamily noglobstar}   &{\ttfamily boolean}   &{\ttfamily false}   &Disable support for matching nested directories with globstars ({\ttfamily $\ast$$\ast$})    \\\cline{1-4}
{\ttfamily nonegate}   &{\ttfamily boolean}   &{\ttfamily false}   &Disable support for negating with leading {\ttfamily !}    \\\cline{1-4}
{\ttfamily noquantifiers}   &{\ttfamily boolean}   &{\ttfamily false}   &Disable support for regex quantifiers (like {\ttfamily a\{1,2\}}) and treat them as brace patterns to be expanded.    \\\cline{1-4}
\href{\#optionsonIgnore}{\texttt{ on\+Ignore}}   &{\ttfamily function}   &{\ttfamily undefined}   &Function to be called on ignored items.    \\\cline{1-4}
\href{\#optionsonMatch}{\texttt{ on\+Match}}   &{\ttfamily function}   &{\ttfamily undefined}   &Function to be called on matched items.    \\\cline{1-4}
\href{\#optionsonResult}{\texttt{ on\+Result}}   &{\ttfamily function}   &{\ttfamily undefined}   &Function to be called on all items, regardless of whether or not they are matched or ignored.    \\\cline{1-4}
{\ttfamily posix}   &{\ttfamily boolean}   &{\ttfamily false}   &Support POSIX character classes (\char`\"{}posix brackets\char`\"{}).    \\\cline{1-4}
{\ttfamily posix\+Slashes}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Convert all slashes in file paths to forward slashes. This does not convert slashes in the glob pattern itself    \\\cline{1-4}
{\ttfamily prepend}   &{\ttfamily boolean}   &{\ttfamily undefined}   &String to prepend to the generated regex used for matching.    \\\cline{1-4}
{\ttfamily regex}   &{\ttfamily boolean}   &{\ttfamily false}   &Use regular expression rules for {\ttfamily +} (instead of matching literal {\ttfamily +}), and for stars that follow closing parentheses or brackets (as in {\ttfamily )$\ast$} and {\ttfamily \mbox{]}$\ast$}).    \\\cline{1-4}
{\ttfamily strict\+Brackets}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Throw an error if brackets, braces, or parens are imbalanced.    \\\cline{1-4}
{\ttfamily strict\+Slashes}   &{\ttfamily boolean}   &{\ttfamily undefined}   &When true, picomatch won\textquotesingle{}t match trailing slashes with single stars.    \\\cline{1-4}
{\ttfamily unescape}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Remove backslashes preceding escaped characters in the glob pattern. By default, backslashes are retained.    \\\cline{1-4}
{\ttfamily unixify}   &{\ttfamily boolean}   &{\ttfamily undefined}   &Alias for {\ttfamily posix\+Slashes}, for backwards compatibility.   \\\cline{1-4}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20367}{}\doxysubsubsection{Scan Options}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20367}
In addition to the main \href{\#picomatch-options}{\texttt{ picomatch options}}, the following options may also be used with the \href{\#scan}{\texttt{ .scan}} method.

\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{4}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Option}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Type}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Default value}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-4}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Option}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Type}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Default value}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-4}
\endhead
{\ttfamily tokens}   &{\ttfamily boolean}   &{\ttfamily false}   &When {\ttfamily true}, the returned object will include an array of tokens (objects), representing each path \char`\"{}segment\char`\"{} in the scanned glob pattern    \\\cline{1-4}
{\ttfamily parts}   &{\ttfamily boolean}   &{\ttfamily false}   &When {\ttfamily true}, the returned object will include an array of strings representing each path \char`\"{}segment\char`\"{} in the scanned glob pattern. This is automatically enabled when {\ttfamily options.\+tokens} is true   \\\cline{1-4}
\end{longtabu}


{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const picomatch = require('picomatch');}
\DoxyCodeLine{const result = picomatch.scan('!./foo/*.js', \{ tokens: true \});}
\DoxyCodeLine{console.log(result);}
\DoxyCodeLine{// \{}
\DoxyCodeLine{//   prefix: '!./',}
\DoxyCodeLine{//   input: '!./foo/*.js',}
\DoxyCodeLine{//   start: 3,}
\DoxyCodeLine{//   base: 'foo',}
\DoxyCodeLine{//   glob: '*.js',}
\DoxyCodeLine{//   isBrace: false,}
\DoxyCodeLine{//   isBracket: false,}
\DoxyCodeLine{//   isGlob: true,}
\DoxyCodeLine{//   isExtglob: false,}
\DoxyCodeLine{//   isGlobstar: false,}
\DoxyCodeLine{//   negated: true,}
\DoxyCodeLine{//   maxDepth: 2,}
\DoxyCodeLine{//   tokens: [}
\DoxyCodeLine{//     \{ value: '!./', depth: 0, isGlob: false, negated: true, isPrefix: true \},}
\DoxyCodeLine{//     \{ value: 'foo', depth: 1, isGlob: false \},}
\DoxyCodeLine{//     \{ value: '*.js', depth: 1, isGlob: true \}}
\DoxyCodeLine{//   ],}
\DoxyCodeLine{//   slashes: [ 2, 6 ],}
\DoxyCodeLine{//   parts: [ 'foo', '*.js' ]}
\DoxyCodeLine{// \} }

\end{DoxyCode}


~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20368}{}\doxysubsubsection{Options Examples}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20368}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20369}{}\doxyparagraph{options.\+expand\+Range}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20369}
{\bfseries{Type}}\+: {\ttfamily function}

{\bfseries{Default}}\+: {\ttfamily undefined}

Custom function for expanding ranges in brace patterns. The \href{https://github.com/jonschlinkert/fill-range}{\texttt{ fill-\/range}} library is ideal for this purpose, or you can use custom code to do whatever you need.

{\bfseries{Example}}

The following example shows how to create a glob that matches a folder


\begin{DoxyCode}{0}
\DoxyCodeLine{const fill = require('fill-\/range');}
\DoxyCodeLine{const regex = pm.makeRe('foo/\{01..25\}/bar', \{}
\DoxyCodeLine{  expandRange(a, b) \{}
\DoxyCodeLine{    return `(\$\{fill(a, b, \{ toRegex: true \})\})`;}
\DoxyCodeLine{  \}}
\DoxyCodeLine{\});}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(regex);}
\DoxyCodeLine{//=> /\string^(?:foo\(\backslash\)/((?:0[1-\/9]|1[0-\/9]|2[0-\/5]))\(\backslash\)/bar)\$/}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(regex.test('foo/00/bar'))  // false}
\DoxyCodeLine{console.log(regex.test('foo/01/bar'))  // true}
\DoxyCodeLine{console.log(regex.test('foo/10/bar')) // true}
\DoxyCodeLine{console.log(regex.test('foo/22/bar')) // true}
\DoxyCodeLine{console.log(regex.test('foo/25/bar')) // true}
\DoxyCodeLine{console.log(regex.test('foo/26/bar')) // false }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20370}{}\doxyparagraph{options.\+format}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20370}
{\bfseries{Type}}\+: {\ttfamily function}

{\bfseries{Default}}\+: {\ttfamily undefined}

Custom function for formatting strings before they\textquotesingle{}re matched.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{// strip leading './' from strings}
\DoxyCodeLine{const format = str => str.replace(/\string^\(\backslash\).\(\backslash\)//, '');}
\DoxyCodeLine{const isMatch = picomatch('foo/*.js', \{ format \});}
\DoxyCodeLine{console.log(isMatch('./foo/bar.js')); //=> true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20371}{}\doxyparagraph{options.\+on\+Match}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20371}

\begin{DoxyCode}{0}
\DoxyCodeLine{const onMatch = (\{ glob, regex, input, output \}) => \{}
\DoxyCodeLine{  console.log(\{ glob, regex, input, output \});}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{const isMatch = picomatch('*', \{ onMatch \});}
\DoxyCodeLine{isMatch('foo');}
\DoxyCodeLine{isMatch('bar');}
\DoxyCodeLine{isMatch('baz'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20372}{}\doxyparagraph{options.\+on\+Ignore}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20372}

\begin{DoxyCode}{0}
\DoxyCodeLine{const onIgnore = (\{ glob, regex, input, output \}) => \{}
\DoxyCodeLine{  console.log(\{ glob, regex, input, output \});}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{const isMatch = picomatch('*', \{ onIgnore, ignore: 'f*' \});}
\DoxyCodeLine{isMatch('foo');}
\DoxyCodeLine{isMatch('bar');}
\DoxyCodeLine{isMatch('baz'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20373}{}\doxyparagraph{options.\+on\+Result}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20373}

\begin{DoxyCode}{0}
\DoxyCodeLine{const onResult = (\{ glob, regex, input, output \}) => \{}
\DoxyCodeLine{  console.log(\{ glob, regex, input, output \});}
\DoxyCodeLine{\};}
\DoxyCodeLine{}
\DoxyCodeLine{const isMatch = picomatch('*', \{ onResult, ignore: 'f*' \});}
\DoxyCodeLine{isMatch('foo');}
\DoxyCodeLine{isMatch('bar');}
\DoxyCodeLine{isMatch('baz'); }

\end{DoxyCode}


~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20374}{}\doxysubsection{Globbing features}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20374}

\begin{DoxyItemize}
\item \href{\#basic-globbing}{\texttt{ Basic globbing}} (Wildcard matching)
\item \href{\#advanced-globbing}{\texttt{ Advanced globbing}} (extglobs, posix brackets, brace matching)
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20375}{}\doxysubsubsection{Basic globbing}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20375}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Character}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Character}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-2}
\endhead
{\ttfamily $\ast$}   &Matches any character zero or more times, excluding path separators. Does {\itshape not match} path separators or hidden files or directories (\char`\"{}dotfiles\char`\"{}), unless explicitly enabled by setting the {\ttfamily dot} option to {\ttfamily true}.    \\\cline{1-2}
{\ttfamily $\ast$$\ast$}   &Matches any character zero or more times, including path separators. Note that {\ttfamily $\ast$$\ast$} will only match path separators ({\ttfamily /}, and {\ttfamily \textbackslash{}\textbackslash{}} on Windows) when they are the only characters in a path segment. Thus, {\ttfamily foo$\ast$$\ast$/bar} is equivalent to {\ttfamily foo$\ast$/bar}, and {\ttfamily foo/a$\ast$$\ast$b/bar} is equivalent to {\ttfamily foo/a$\ast$b/bar}, and {\itshape more than two} consecutive stars in a glob path segment are regarded as {\itshape a single star}. Thus, {\ttfamily foo/$\ast$$\ast$$\ast$/bar} is equivalent to {\ttfamily foo/$\ast$/bar}.    \\\cline{1-2}
{\ttfamily ?}   &Matches any character excluding path separators one time. Does {\itshape not match} path separators or leading dots.    \\\cline{1-2}
{\ttfamily \mbox{[}abc\mbox{]}}   &Matches any characters inside the brackets. For example, {\ttfamily \mbox{[}abc\mbox{]}} would match the characters {\ttfamily a}, {\ttfamily b} or {\ttfamily c}, and nothing else.   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20376}{}\doxyparagraph{Matching behavior vs. Bash}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20376}
Picomatch\textquotesingle{}s matching features and expected results in unit tests are based on Bash\textquotesingle{}s unit tests and the Bash 4.\+3 specification, with the following exceptions\+:


\begin{DoxyItemize}
\item Bash will match {\ttfamily foo/bar/baz} with {\ttfamily $\ast$}. Picomatch only matches nested directories with {\ttfamily $\ast$$\ast$}.
\item Bash greedily matches with negated extglobs. For example, Bash 4.\+3 says that {\ttfamily !(foo)$\ast$} should match {\ttfamily foo} and {\ttfamily foobar}, since the trailing {\ttfamily $\ast$} bracktracks to match the preceding pattern. This is very memory-\/inefficient, and IMHO, also incorrect. Picomatch would return {\ttfamily false} for both {\ttfamily foo} and {\ttfamily foobar}.
\end{DoxyItemize}

~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20377}{}\doxysubsubsection{Advanced globbing}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20377}

\begin{DoxyItemize}
\item \href{\#extglobs}{\texttt{ extglobs}}
\item \href{\#posix-brackets}{\texttt{ POSIX brackets}}
\item \href{\#brace-expansion}{\texttt{ Braces}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20378}{}\doxyparagraph{Extglobs}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20378}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Pattern}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Pattern}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Description}}    }\\\cline{1-2}
\endhead
{\ttfamily @(pattern)}   &Match {\itshape only one} consecutive occurrence of {\ttfamily pattern}    \\\cline{1-2}
{\ttfamily $\ast$(pattern)}   &Match {\itshape zero or more} consecutive occurrences of {\ttfamily pattern}    \\\cline{1-2}
{\ttfamily +(pattern)}   &Match {\itshape one or more} consecutive occurrences of {\ttfamily pattern}    \\\cline{1-2}
{\ttfamily ?(pattern)}   &Match {\itshape zero or {\bfseries{one}}} consecutive occurrences of {\ttfamily pattern}    \\\cline{1-2}
{\ttfamily !(pattern)}   &Match {\itshape anything but} {\ttfamily pattern}   \\\cline{1-2}
\end{longtabu}


{\bfseries{Examples}}


\begin{DoxyCode}{0}
\DoxyCodeLine{const pm = require('picomatch');}
\DoxyCodeLine{}
\DoxyCodeLine{// *(pattern) matches ZERO or more of "{}pattern"{}}
\DoxyCodeLine{console.log(pm.isMatch('a', 'a*(z)')); // true}
\DoxyCodeLine{console.log(pm.isMatch('az', 'a*(z)')); // true}
\DoxyCodeLine{console.log(pm.isMatch('azzz', 'a*(z)')); // true}
\DoxyCodeLine{}
\DoxyCodeLine{// +(pattern) matches ONE or more of "{}pattern"{}}
\DoxyCodeLine{console.log(pm.isMatch('a', 'a*(z)')); // true}
\DoxyCodeLine{console.log(pm.isMatch('az', 'a*(z)')); // true}
\DoxyCodeLine{console.log(pm.isMatch('azzz', 'a*(z)')); // true}
\DoxyCodeLine{}
\DoxyCodeLine{// supports multiple extglobs}
\DoxyCodeLine{console.log(pm.isMatch('foo.bar', '!(foo).!(bar)')); // false}
\DoxyCodeLine{}
\DoxyCodeLine{// supports nested extglobs}
\DoxyCodeLine{console.log(pm.isMatch('foo.bar', '!(!(foo)).!(!(bar))')); // true }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20379}{}\doxyparagraph{POSIX brackets}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20379}
POSIX classes are disabled by default. Enable this feature by setting the {\ttfamily posix} option to true.

{\bfseries{Enable POSIX bracket support}}


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(pm.makeRe('[[:word:]]+', \{ posix: true \}));}
\DoxyCodeLine{//=> /\string^(?:(?=.)[A-\/Za-\/z0-\/9\_]+\(\backslash\)/?)\$/ }

\end{DoxyCode}


{\bfseries{Supported POSIX classes}}

The following named POSIX bracket expressions are supported\+:


\begin{DoxyItemize}
\item {\ttfamily \mbox{[}\+:alnum\+:\mbox{]}} -\/ Alphanumeric characters, equ {\ttfamily \mbox{[}a-\/z\+A-\/\+Z0-\/9\mbox{]}}
\item {\ttfamily \mbox{[}\+:alpha\+:\mbox{]}} -\/ Alphabetical characters, equivalent to {\ttfamily \mbox{[}a-\/z\+A-\/Z\mbox{]}}.
\item {\ttfamily \mbox{[}\+:ascii\+:\mbox{]}} -\/ ASCII characters, equivalent to {\ttfamily \mbox{[}\textbackslash{}\textbackslash{}x00-\/\textbackslash{}\textbackslash{}x7F\mbox{]}}.
\item {\ttfamily \mbox{[}\+:blank\+:\mbox{]}} -\/ Space and tab characters, equivalent to {\ttfamily \mbox{[} \textbackslash{}\textbackslash{}t\mbox{]}}.
\item {\ttfamily \mbox{[}\+:cntrl\+:\mbox{]}} -\/ Control characters, equivalent to {\ttfamily \mbox{[}\textbackslash{}\textbackslash{}x00-\/\textbackslash{}\textbackslash{}x1F\textbackslash{}\textbackslash{}x7F\mbox{]}}.
\item {\ttfamily \mbox{[}\+:digit\+:\mbox{]}} -\/ Numerical digits, equivalent to {\ttfamily \mbox{[}0-\/9\mbox{]}}.
\item {\ttfamily \mbox{[}\+:graph\+:\mbox{]}} -\/ Graph characters, equivalent to {\ttfamily \mbox{[}\textbackslash{}\textbackslash{}x21-\/\textbackslash{}\textbackslash{}x7E\mbox{]}}.
\item {\ttfamily \mbox{[}\+:lower\+:\mbox{]}} -\/ Lowercase letters, equivalent to {\ttfamily \mbox{[}a-\/z\mbox{]}}.
\item {\ttfamily \mbox{[}\+:print\+:\mbox{]}} -\/ Print characters, equivalent to {\ttfamily \mbox{[}\textbackslash{}\textbackslash{}x20-\/\textbackslash{}\textbackslash{}x7E \mbox{]}}.
\item {\ttfamily \mbox{[}\+:punct\+:\mbox{]}} -\/ Punctuation and symbols, equivalent to `\mbox{[}\textbackslash{}-\/!"{}\#\$\%\&\&rsquo;()\textbackslash{}$\ast$+,./\+:;$<$=$>$?@\mbox{[}\textbackslash{}\mbox{]}$^\wedge$\+\_\+{\ttfamily \{$\vert$\}$\sim$\mbox{]}}.
\item {\ttfamily \mbox{[}\+:space\+:\mbox{]}} -\/ Extended space characters, equivalent to {\ttfamily \mbox{[} \textbackslash{}\textbackslash{}t\textbackslash{}\textbackslash{}r\textbackslash{}\textbackslash{}n\textbackslash{}\textbackslash{}v\textbackslash{}\textbackslash{}f\mbox{]}}.
\item {\ttfamily \mbox{[}\+:upper\+:\mbox{]}} -\/ Uppercase letters, equivalent to {\ttfamily \mbox{[}A-\/Z\mbox{]}}.
\item {\ttfamily \mbox{[}\+:word\+:\mbox{]}} -\/ Word characters (letters, numbers and underscores), equivalent to {\ttfamily \mbox{[}A-\/\+Za-\/z0-\/9\+\_\+\mbox{]}}.
\item {\ttfamily \mbox{[}\+:xdigit\+:\mbox{]}} -\/ Hexadecimal digits, equivalent to {\ttfamily \mbox{[}A-\/\+Fa-\/f0-\/9\mbox{]}}.
\end{DoxyItemize}

See the \href{https://www.gnu.org/software/bash/manual/html_node/Pattern-Matching.html}{\texttt{ Bash Reference Manual}} for more information.\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20380}{}\doxysubsubsection{Braces}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20380}
Picomatch does not do brace expansion. For \href{https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html}{\texttt{ brace expansion}} and advanced matching with braces, use \href{https://github.com/micromatch/micromatch}{\texttt{ micromatch}} instead. Picomatch has very basic support for braces.\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20381}{}\doxysubsubsection{Matching special characters as literals}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20381}
If you wish to match the following special characters in a filepath, and you want to use these characters in your glob pattern, they must be escaped with backslashes or quotes\+:

{\bfseries{Special Characters}}

Some characters that are used for matching in regular expressions are also regarded as valid file path characters on some platforms.

To match any of the following characters as literals\+: \`{}\$$^\wedge$$\ast$+?()\mbox{[}\mbox{]}

Examples\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(pm.makeRe('foo/bar \(\backslash\)\(\backslash\)(1\(\backslash\)\(\backslash\))'));}
\DoxyCodeLine{console.log(pm.makeRe('foo/bar \(\backslash\)\(\backslash\)(1\(\backslash\)\(\backslash\))')); }

\end{DoxyCode}


~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20382}{}\doxysubsection{Library Comparisons}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20382}
The following table shows which features are supported by \href{https://github.com/isaacs/minimatch}{\texttt{ minimatch}}, \href{https://github.com/micromatch/micromatch}{\texttt{ micromatch}}, \href{https://github.com/micromatch/picomatch}{\texttt{ picomatch}}, \href{https://github.com/micromatch/nanomatch}{\texttt{ nanomatch}}, \href{https://github.com/micromatch/extglob}{\texttt{ extglob}}, \href{https://github.com/micromatch/braces}{\texttt{ braces}}, and \href{https://github.com/micromatch/expand-brackets}{\texttt{ expand-\/brackets}}.

\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{8}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Feature}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily minimatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily micromatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily picomatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily nanomatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily extglob}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily braces}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily expand-\/brackets}    }\\\cline{1-8}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Feature}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily minimatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily micromatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily picomatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily nanomatch}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily extglob}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily braces}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\ttfamily expand-\/brackets}    }\\\cline{1-8}
\endhead
Wildcard matching ({\ttfamily $\ast$?+})   &✔   &✔   &✔   &✔   &-\/   &-\/   &-\/    \\\cline{1-8}
Advancing globbing   &✔   &✔   &✔   &-\/   &-\/   &-\/   &-\/    \\\cline{1-8}
Brace {\itshape matching}   &✔   &✔   &✔   &-\/   &-\/   &✔   &-\/    \\\cline{1-8}
Brace {\itshape expansion}   &✔   &✔   &-\/   &-\/   &-\/   &✔   &-\/    \\\cline{1-8}
Extglobs   &partial   &✔   &✔   &-\/   &✔   &-\/   &-\/    \\\cline{1-8}
Posix brackets   &-\/   &✔   &✔   &-\/   &-\/   &-\/   &✔    \\\cline{1-8}
Regular expression syntax   &-\/   &✔   &✔   &✔   &✔   &-\/   &✔    \\\cline{1-8}
File system operations   &-\/   &-\/   &-\/   &-\/   &-\/   &-\/   &-\/   \\\cline{1-8}
\end{longtabu}


~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20383}{}\doxysubsection{Benchmarks}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20383}
Performance comparison of picomatch and minimatch.


\begin{DoxyCode}{0}
\DoxyCodeLine{\# .makeRe star}
\DoxyCodeLine{  picomatch x 1,993,050 ops/sec ±0.51\% (91 runs sampled)}
\DoxyCodeLine{  minimatch x 627,206 ops/sec ±1.96\% (87 runs sampled))}
\DoxyCodeLine{}
\DoxyCodeLine{\# .makeRe star; dot=true}
\DoxyCodeLine{  picomatch x 1,436,640 ops/sec ±0.62\% (91 runs sampled)}
\DoxyCodeLine{  minimatch x 525,876 ops/sec ±0.60\% (88 runs sampled)}
\DoxyCodeLine{}
\DoxyCodeLine{\# .makeRe globstar}
\DoxyCodeLine{  picomatch x 1,592,742 ops/sec ±0.42\% (90 runs sampled)}
\DoxyCodeLine{  minimatch x 962,043 ops/sec ±1.76\% (91 runs sampled)d)}
\DoxyCodeLine{}
\DoxyCodeLine{\# .makeRe globstars}
\DoxyCodeLine{  picomatch x 1,615,199 ops/sec ±0.35\% (94 runs sampled)}
\DoxyCodeLine{  minimatch x 477,179 ops/sec ±1.33\% (91 runs sampled)}
\DoxyCodeLine{}
\DoxyCodeLine{\# .makeRe with leading star}
\DoxyCodeLine{  picomatch x 1,220,856 ops/sec ±0.40\% (92 runs sampled)}
\DoxyCodeLine{  minimatch x 453,564 ops/sec ±1.43\% (94 runs sampled)}
\DoxyCodeLine{}
\DoxyCodeLine{\# .makeRe -\/ basic braces}
\DoxyCodeLine{  picomatch x 392,067 ops/sec ±0.70\% (90 runs sampled)}
\DoxyCodeLine{  minimatch x 99,532 ops/sec ±2.03\% (87 runs sampled)) }

\end{DoxyCode}


~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20384}{}\doxysubsection{Philosophies}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20384}
The goal of this library is to be blazing fast, without compromising on accuracy.

{\bfseries{Accuracy}}

The number one of goal of this library is accuracy. However, it\textquotesingle{}s not unusual for different glob implementations to have different rules for matching behavior, even with simple wildcard matching. It gets increasingly more complicated when combinations of different features are combined, like when extglobs are combined with globstars, braces, slashes, and so on\+: {\ttfamily !($\ast$$\ast$/\{a,b,$\ast$/c\})}.

Thus, given that there is no canonical glob specification to use as a single source of truth when differences of opinion arise regarding behavior, sometimes we have to implement our best judgement and rely on feedback from users to make improvements.

{\bfseries{Performance}}

Although this library performs well in benchmarks, and in most cases it\textquotesingle{}s faster than other popular libraries we benchmarked against, we will always choose accuracy over performance. It\textquotesingle{}s not helpful to anyone if our library is faster at returning the wrong answer.

~\newline
 ~\newline
\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20385}{}\doxysubsection{About}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20385}
$<$details$>$

{\bfseries{Contributing}} 

Pull requests and stars are always welcome. For bugs and feature requests, \href{../../issues/new}{\texttt{ please create an issue}}.

Please read the contributing guide for advice on opening issues, pull requests, and coding standards.

$<$/details$>$

$<$details$>$

{\bfseries{Running Tests}} 

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm install \&\& npm test }

\end{DoxyCode}


$<$/details$>$

$<$details$>$

{\bfseries{Building docs}} 

\+\_\+(This project\textquotesingle{}s readme.\+md is generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb}}, please don\textquotesingle{}t edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)\+\_\+

To generate the readme, run the following command\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm install -\/g verbose/verb\#dev verb-\/generate-\/readme \&\& verb }

\end{DoxyCode}


$<$/details$>$\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20386}{}\doxysubsubsection{Author}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20386}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://github.com/jonschlinkert}{\texttt{ Git\+Hub Profile}}
\item \href{https://twitter.com/jonschlinkert}{\texttt{ Twitter Profile}}
\item \href{https://linkedin.com/in/jonschlinkert}{\texttt{ Linked\+In Profile}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_picomatch_README_autotoc_md20387}{}\doxysubsubsection{License}\label{md_sfcode_node_modules_picomatch_README_autotoc_md20387}
Copyright © 2017-\/present, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \mbox{[}MIT License\mbox{]}(LICENSE). 