\href{https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html}{\texttt{ Brace expansion}}, as known from sh/bash, in Java\+Script.

\href{http://travis-ci.org/juliangruber/brace-expansion}{\texttt{ }} \href{https://www.npmjs.org/package/brace-expansion}{\texttt{ }} \href{https://greenkeeper.io/}{\texttt{ }}

\href{https://ci.testling.com/juliangruber/brace-expansion}{\texttt{ }}\hypertarget{md_sfcode_node_modules_brace_expansion_README_autotoc_md4288}{}\doxysection{Example}\label{md_sfcode_node_modules_brace_expansion_README_autotoc_md4288}

\begin{DoxyCode}{0}
\DoxyCodeLine{var expand = require('brace-\/expansion');}
\DoxyCodeLine{}
\DoxyCodeLine{expand('file-\/\{a,b,c\}.jpg')}
\DoxyCodeLine{// => ['file-\/a.jpg', 'file-\/b.jpg', 'file-\/c.jpg']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('-\/v\{,,\}')}
\DoxyCodeLine{// => ['-\/v', '-\/v', '-\/v']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('file\{0..2\}.jpg')}
\DoxyCodeLine{// => ['file0.jpg', 'file1.jpg', 'file2.jpg']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('file-\/\{a..c\}.jpg')}
\DoxyCodeLine{// => ['file-\/a.jpg', 'file-\/b.jpg', 'file-\/c.jpg']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('file\{2..0\}.jpg')}
\DoxyCodeLine{// => ['file2.jpg', 'file1.jpg', 'file0.jpg']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('file\{0..4..2\}.jpg')}
\DoxyCodeLine{// => ['file0.jpg', 'file2.jpg', 'file4.jpg']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('file-\/\{a..e..2\}.jpg')}
\DoxyCodeLine{// => ['file-\/a.jpg', 'file-\/c.jpg', 'file-\/e.jpg']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('file\{00..10..5\}.jpg')}
\DoxyCodeLine{// => ['file00.jpg', 'file05.jpg', 'file10.jpg']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('\{\{A..C\},\{a..c\}\}')}
\DoxyCodeLine{// => ['A', 'B', 'C', 'a', 'b', 'c']}
\DoxyCodeLine{}
\DoxyCodeLine{expand('ppp\{,config,oe\{,conf\}\}')}
\DoxyCodeLine{// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_brace_expansion_README_autotoc_md4289}{}\doxysection{API}\label{md_sfcode_node_modules_brace_expansion_README_autotoc_md4289}

\begin{DoxyCode}{0}
\DoxyCodeLine{var expand = require('brace-\/expansion'); }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_brace_expansion_README_autotoc_md4290}{}\doxysubsection{var expanded = expand(str)}\label{md_sfcode_node_modules_brace_expansion_README_autotoc_md4290}
Return an array of all possible and valid expansions of {\ttfamily str}. If none are found, {\ttfamily \mbox{[}str\mbox{]}} is returned.

Valid expansions are\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{/\string^(.*,)+(.+)?\$/}
\DoxyCodeLine{// \{a,b,...\} }

\end{DoxyCode}


A comma separated list of options, like {\ttfamily \{a,b\}} or {\ttfamily \{a,\{b,c\}\}} or {\ttfamily \{,a,\}}.


\begin{DoxyCode}{0}
\DoxyCodeLine{/\string^-\/?\(\backslash\)d+\(\backslash\).\(\backslash\).-\/?\(\backslash\)d+(\(\backslash\).\(\backslash\).-\/?\(\backslash\)d+)?\$/}
\DoxyCodeLine{// \{x..y[..incr]\} }

\end{DoxyCode}


A numeric sequence from {\ttfamily x} to {\ttfamily y} inclusive, with optional increment. If {\ttfamily x} or {\ttfamily y} start with a leading {\ttfamily 0}, all the numbers will be padded to have equal length. Negative numbers and backwards iteration work too.


\begin{DoxyCode}{0}
\DoxyCodeLine{/\string^-\/?\(\backslash\)d+\(\backslash\).\(\backslash\).-\/?\(\backslash\)d+(\(\backslash\).\(\backslash\).-\/?\(\backslash\)d+)?\$/}
\DoxyCodeLine{// \{x..y[..incr]\} }

\end{DoxyCode}


An alphabetic sequence from {\ttfamily x} to {\ttfamily y} inclusive, with optional increment. {\ttfamily x} and {\ttfamily y} must be exactly one character, and if given, {\ttfamily incr} must be a number.

For compatibility reasons, the string {\ttfamily \$\{} is not eligible for brace expansion.\hypertarget{md_sfcode_node_modules_brace_expansion_README_autotoc_md4291}{}\doxysection{Installation}\label{md_sfcode_node_modules_brace_expansion_README_autotoc_md4291}
With \href{https://npmjs.org}{\texttt{ npm}} do\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm install brace-\/expansion }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_brace_expansion_README_autotoc_md4292}{}\doxysection{Contributors}\label{md_sfcode_node_modules_brace_expansion_README_autotoc_md4292}

\begin{DoxyItemize}
\item \href{https://github.com/juliangruber}{\texttt{ Julian Gruber}}
\item \href{https://github.com/isaacs}{\texttt{ Isaac Z. Schlueter}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_brace_expansion_README_autotoc_md4293}{}\doxysection{Sponsors}\label{md_sfcode_node_modules_brace_expansion_README_autotoc_md4293}
This module is proudly supported by my \href{https://github.com/juliangruber/sponsors}{\texttt{ Sponsors}}!

Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my \href{https://www.patreon.com/juliangruber}{\texttt{ Patreon}}. Not sure how much of my modules you\textquotesingle{}re using? Try \href{https://github.com/feross/thanks}{\texttt{ feross/thanks}}!\hypertarget{md_sfcode_node_modules_brace_expansion_README_autotoc_md4294}{}\doxysection{License}\label{md_sfcode_node_modules_brace_expansion_README_autotoc_md4294}
(MIT)

Copyright (c) 2013 Julian Gruber $<$\href{mailto:julian@juliangruber.com}{\texttt{ julian@juliangruber.\+com}}$>$

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \char`\"{}\+Software\char`\"{}), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions\+:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED \char`\"{}\+AS IS\char`\"{}, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 