\begin{quote}
Expand POSIX bracket expressions (character classes) in glob patterns. \end{quote}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9492}{}\doxysection{Install}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9492}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save expand-\/brackets }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9493}{}\doxysection{Usage}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9493}

\begin{DoxyCode}{0}
\DoxyCodeLine{var brackets = require('expand-\/brackets');}
\DoxyCodeLine{brackets(string[, options]); }

\end{DoxyCode}


{\bfseries{Params}}

The main export is a function that takes the following parameters\+:


\begin{DoxyItemize}
\item {\ttfamily pattern} $\ast$$\ast$\{String\}$\ast$$\ast$\+: the pattern to convert
\item {\ttfamily options} $\ast$$\ast$\{Object\}$\ast$$\ast$\+: optionally supply an options object
\item {\ttfamily returns} $\ast$$\ast$\{String\}$\ast$$\ast$\+: returns a string that can be used to create a regex
\end{DoxyItemize}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(brackets('[![:lower:]]'));}
\DoxyCodeLine{//=> '[\string^a-\/z]' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9494}{}\doxysection{API}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9494}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9495}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L29\char`\"{}$>$brackets$<$/a$>$}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9495}
Parses the given POSIX character class {\ttfamily pattern} and returns a string that can be used for creating regular expressions for matching.

{\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$
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9496}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L54\char`\"{}$>$.\+match$<$/a$>$}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9496}
Takes an array of strings and a POSIX character class pattern, and returns a new array with only the strings that matched the pattern.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var brackets = require('expand-\/brackets');}
\DoxyCodeLine{console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]'));}
\DoxyCodeLine{//=> ['a']}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(brackets.match(['1', 'a', 'ab'], '[[:alpha:]]+'));}
\DoxyCodeLine{//=> ['a', 'ab'] }

\end{DoxyCode}


{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily arr} $\ast$$\ast$\{Array\}$\ast$$\ast$\+: Array of strings to match
\item {\ttfamily pattern} $\ast$$\ast$\{String\}$\ast$$\ast$\+: POSIX character class pattern(s)
\item {\ttfamily options} $\ast$$\ast$\{Object\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Array\}$\ast$$\ast$
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9497}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L100\char`\"{}$>$.\+is\+Match$<$/a$>$}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9497}
Returns true if the specified {\ttfamily string} matches the given brackets {\ttfamily pattern}.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var brackets = require('expand-\/brackets');}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(brackets.isMatch('a.a', '[[:alpha:]].[[:alpha:]]'));}
\DoxyCodeLine{//=> true}
\DoxyCodeLine{console.log(brackets.isMatch('1.2', '[[:alpha:]].[[:alpha:]]'));}
\DoxyCodeLine{//=> false }

\end{DoxyCode}


{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily string} $\ast$$\ast$\{String\}$\ast$$\ast$\+: String to match
\item {\ttfamily pattern} $\ast$$\ast$\{String\}$\ast$$\ast$\+: Poxis pattern
\item {\ttfamily options} $\ast$$\ast$\{String\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Boolean\}$\ast$$\ast$
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9498}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L123\char`\"{}$>$.\+matcher$<$/a$>$}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9498}
Takes a POSIX character class pattern and returns a matcher function. The returned function takes the string to match as its only argument.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var brackets = require('expand-\/brackets');}
\DoxyCodeLine{var isMatch = brackets.matcher('[[:lower:]].[[:upper:]]');}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(isMatch('a.a'));}
\DoxyCodeLine{//=> false}
\DoxyCodeLine{console.log(isMatch('a.A'));}
\DoxyCodeLine{//=> true }

\end{DoxyCode}


{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily pattern} $\ast$$\ast$\{String\}$\ast$$\ast$\+: Poxis pattern
\item {\ttfamily options} $\ast$$\ast$\{String\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Boolean\}$\ast$$\ast$
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9499}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L145\char`\"{}$>$.\+make\+Re$<$/a$>$}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9499}
Create a regular expression from the given {\ttfamily pattern}.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var brackets = require('expand-\/brackets');}
\DoxyCodeLine{var re = brackets.makeRe('[[:alpha:]]');}
\DoxyCodeLine{console.log(re);}
\DoxyCodeLine{//=> /\string^(?:[a-\/zA-\/Z])\$/ }

\end{DoxyCode}


{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily pattern} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The pattern to convert to regex.
\item {\ttfamily options} $\ast$$\ast$\{Object\}$\ast$$\ast$
\item {\ttfamily returns} $\ast$$\ast$\{Reg\+Exp\}$\ast$$\ast$
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9500}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L187\char`\"{}$>$.\+create$<$/a$>$}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9500}
Parses the given POSIX character class {\ttfamily pattern} and returns an object with the compiled {\ttfamily output} and optional source {\ttfamily map}.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var brackets = require('expand-\/brackets');}
\DoxyCodeLine{console.log(brackets('[[:alpha:]]'));}
\DoxyCodeLine{// \{ options: \{ source: 'string' \},}
\DoxyCodeLine{//   input: '[[:alpha:]]',}
\DoxyCodeLine{//   state: \{\},}
\DoxyCodeLine{//   compilers:}
\DoxyCodeLine{//    \{ eos: [Function],}
\DoxyCodeLine{//      noop: [Function],}
\DoxyCodeLine{//      bos: [Function],}
\DoxyCodeLine{//      not: [Function],}
\DoxyCodeLine{//      escape: [Function],}
\DoxyCodeLine{//      text: [Function],}
\DoxyCodeLine{//      posix: [Function],}
\DoxyCodeLine{//      bracket: [Function],}
\DoxyCodeLine{//      'bracket.open': [Function],}
\DoxyCodeLine{//      'bracket.inner': [Function],}
\DoxyCodeLine{//      'bracket.literal': [Function],}
\DoxyCodeLine{//      'bracket.close': [Function] \},}
\DoxyCodeLine{//   output: '[a-\/zA-\/Z]',}
\DoxyCodeLine{//   ast:}
\DoxyCodeLine{//    \{ type: 'root',}
\DoxyCodeLine{//      errors: [],}
\DoxyCodeLine{//      nodes: [ [Object], [Object], [Object] ] \},}
\DoxyCodeLine{//   parsingErrors: [] \} }

\end{DoxyCode}


{\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$
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9501}{}\doxysection{Options}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9501}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9502}{}\doxysubsection{options.\+sourcemap}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9502}
Generate a source map for the given pattern.

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var res = brackets('[:alpha:]', \{sourcemap: true\});}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(res.map);}
\DoxyCodeLine{// \{ version: 3,}
\DoxyCodeLine{//   sources: [ 'brackets' ],}
\DoxyCodeLine{//   names: [],}
\DoxyCodeLine{//   mappings: 'AAAA,MAAS',}
\DoxyCodeLine{//   sourcesContent: [ '[:alpha:]' ] \} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9503}{}\doxysubsection{POSIX Character classes}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9503}
The following named POSIX bracket expressions are supported\+:


\begin{DoxyItemize}
\item {\ttfamily \mbox{[}\+:alnum\+:\mbox{]}}\+: Alphanumeric characters ({\ttfamily a-\/z\+A-\/\+Z0-\/9\mbox{]}})
\item {\ttfamily \mbox{[}\+:alpha\+:\mbox{]}}\+: Alphabetic characters ({\ttfamily a-\/z\+A-\/Z\mbox{]}})
\item {\ttfamily \mbox{[}\+:blank\+:\mbox{]}}\+: Space and tab ({\ttfamily \mbox{[} t\mbox{]}})
\item {\ttfamily \mbox{[}\+:digit\+:\mbox{]}}\+: Digits ({\ttfamily \mbox{[}0-\/9\mbox{]}})
\item {\ttfamily \mbox{[}\+:lower\+:\mbox{]}}\+: Lowercase letters ({\ttfamily \mbox{[}a-\/z\mbox{]}})
\item {\ttfamily \mbox{[}\+:punct\+:\mbox{]}}\+: Punctuation and symbols. (`\mbox{[}!"{}\#\$\%\&'()$\ast$+, -\/./\+:;$<$=$>$?@ \mbox{[}\mbox{]}$^\wedge$\+\_\+\`{}{\ttfamily \{$\vert$\}$\sim$\mbox{]}})
\item {\ttfamily \mbox{[}\+:upper\+:\mbox{]}}\+: Uppercase letters ({\ttfamily \mbox{[}A-\/Z\mbox{]}})
\item {\ttfamily \mbox{[}\+:word\+:\mbox{]}}\+: Word characters (letters, numbers and underscores) ({\ttfamily \mbox{[}A-\/\+Za-\/z0-\/9\+\_\+\mbox{]}})
\item {\ttfamily \mbox{[}\+:xdigit\+:\mbox{]}}\+: Hexadecimal digits ({\ttfamily \mbox{[}A-\/\+Fa-\/f0-\/9\mbox{]}})
\end{DoxyItemize}

See \href{https://github.com/jonschlinkert/posix-character-classes}{\texttt{ posix-\/character-\/classes}} for more details.

{\bfseries{Not supported}}


\begin{DoxyItemize}
\item \href{https://www.gnu.org/software/gawk/manual/html_node/Bracket-Expressions.html}{\texttt{ equivalence classes}} are not supported
\item \href{https://www.gnu.org/software/gawk/manual/html_node/Bracket-Expressions.html}{\texttt{ POSIX.\+2 collating symbols}} are not supported
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9504}{}\doxysection{Changelog}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9504}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9505}{}\doxysubsection{v2.\+0.\+0}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9505}
{\bfseries{Breaking changes}}


\begin{DoxyItemize}
\item The main export now returns the compiled string, instead of the object returned from the compiler
\end{DoxyItemize}

{\bfseries{Added features}}


\begin{DoxyItemize}
\item Adds a {\ttfamily .create} method to do what the main function did before v2.\+0.\+0
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9506}{}\doxysubsection{v0.\+2.\+0}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9506}
In addition to performance and matching improvements, the v0.\+2.\+0 refactor adds complete POSIX character class support, with the exception of equivalence classes and POSIX.\+2 collating symbols which are not relevant to node.\+js usage.

{\bfseries{Added features}}


\begin{DoxyItemize}
\item parser is exposed, so that expand-\/brackets parsers can be used by upstream parsers (like \href{https://github.com/jonschlinkert/micromatch}{\texttt{ micromatch}})
\item compiler is exposed, so that expand-\/brackets compilers can be used by upstream compilers
\item source maps
\end{DoxyItemize}

{\bfseries{source map example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var brackets = require('expand-\/brackets');}
\DoxyCodeLine{var res = brackets('[:alpha:]');}
\DoxyCodeLine{console.log(res.map);}
\DoxyCodeLine{}
\DoxyCodeLine{\{ version: 3,}
\DoxyCodeLine{     sources: [ 'brackets' ],}
\DoxyCodeLine{     names: [],}
\DoxyCodeLine{     mappings: 'AAAA,MAAS',}
\DoxyCodeLine{     sourcesContent: [ '[:alpha:]' ] \} }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9507}{}\doxysection{About}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9507}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9508}{}\doxysubsection{Related projects}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9508}

\begin{DoxyItemize}
\item \href{https://www.npmjs.com/package/braces}{\texttt{ braces}}\+: Fast, comprehensive, bash-\/like brace expansion implemented in Java\+Script. Complete support for the Bash 4.\+3 braces… \href{https://github.com/jonschlinkert/braces}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/braces}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/extglob}{\texttt{ extglob}}\+: Extended glob support for Java\+Script. Adds (almost) the expressive power of regular expressions to glob… \href{https://github.com/jonschlinkert/extglob}{\texttt{ more}} $\vert$ \mbox{[}homepage\mbox{]}(\href{https://github.com/jonschlinkert/extglob}{\texttt{ https\+://github.\+com/jonschlinkert/extglob}} \char`\"{}\+Extended glob support for Java\+Script. Adds (almost) the expressive power of regular expressions to glob patterns.\char`\"{})
\item \href{https://www.npmjs.com/package/micromatch}{\texttt{ micromatch}}\+: Glob matching for javascript/node.\+js. A drop-\/in replacement and faster alternative to minimatch and multimatch. $\vert$ \href{https://github.com/jonschlinkert/micromatch}{\texttt{ homepage}}
\item \href{https://www.npmjs.com/package/nanomatch}{\texttt{ nanomatch}}\+: Fast, minimal glob matcher for node.\+js. Similar to micromatch, minimatch and multimatch, but complete Bash… \href{https://github.com/jonschlinkert/nanomatch}{\texttt{ more}} $\vert$ \mbox{[}homepage\mbox{]}(\href{https://github.com/jonschlinkert/nanomatch}{\texttt{ https\+://github.\+com/jonschlinkert/nanomatch}} \char`\"{}\+Fast, minimal glob matcher for node.\+js. Similar to micromatch, minimatch and multimatch, but complete Bash 4.\+3 wildcard support only (no support for exglobs, posix brackets or braces)\char`\"{})
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9509}{}\doxysubsection{Contributing}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9509}
Pull requests and stars are always welcome. For bugs and feature requests, \href{../../issues/new}{\texttt{ please create an issue}}.\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9510}{}\doxysubsection{Contributors}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9510}
\tabulinesep=1mm
\begin{longtabu}spread 0pt [c]{*{2}{|X[-1]}|}
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}~\newline
    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}~\newline
    }\\\cline{1-2}
\endhead
66   &\href{https://github.com/jonschlinkert}{\texttt{ jonschlinkert}}    \\\cline{1-2}
2   &\href{https://github.com/MartinKolarik}{\texttt{ Martin\+Kolarik}}    \\\cline{1-2}
2   &\href{https://github.com/es128}{\texttt{ es128}}    \\\cline{1-2}
1   &\href{https://github.com/eush77}{\texttt{ eush77}}   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9511}{}\doxysubsection{Building docs}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9511}
\+\_\+(This document was generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb-\/generate-\/readme}} (a \href{https://github.com/verbose/verb}{\texttt{ verb}} generator), please don\textquotesingle{}t edit the readme directly. Any changes to the readme must be made in .verb.md.)\+\_\+

To generate the readme and API documentation with \href{https://github.com/verbose/verb}{\texttt{ verb}}\+:


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

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9512}{}\doxysubsection{Running tests}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9512}
Install dev dependencies\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/d \&\& npm test }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9513}{}\doxysubsection{Author}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9513}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://github.com/jonschlinkert}{\texttt{ github/jonschlinkert}}
\item \href{http://twitter.com/jonschlinkert}{\texttt{ twitter/jonschlinkert}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_expand_brackets_README_autotoc_md9514}{}\doxysubsection{License}\label{md_sfcode_node_modules_expand_brackets_README_autotoc_md9514}
Copyright © 2016, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \href{https://github.com/jonschlinkert/expand-brackets/blob/master/LICENSE}{\texttt{ MIT license}}.

\DoxyHorRuler{0}


{\itshape This file was generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb-\/generate-\/readme}}, v0.\+2.\+0, on December 12, 2016.} 