\begin{quote}
Fill in a range of numbers or letters, optionally passing an increment or {\ttfamily step} to use, or create a regex-\/compatible range with {\ttfamily options.\+to\+Regex} \end{quote}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12213}{}\doxysection{Table of Contents}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12213}

\begin{DoxyItemize}
\item \href{\#install}{\texttt{ Install}}
\item \href{\#usage}{\texttt{ Usage}}
\item \href{\#examples}{\texttt{ Examples}}
\item \href{\#options}{\texttt{ Options}}
\begin{DoxyItemize}
\item \href{\#optionsstep}{\texttt{ options.\+step}}
\item \href{\#optionsstrictranges}{\texttt{ options.\+strict\+Ranges}}
\item \href{\#optionsstringify}{\texttt{ options.\+stringify}}
\item \href{\#optionstoregex}{\texttt{ options.\+to\+Regex}}
\item \href{\#optionstransform}{\texttt{ options.\+transform}}
\end{DoxyItemize}
\item \href{\#about}{\texttt{ About}}
\end{DoxyItemize}

\+\_\+(TOC generated by \href{https://github.com/verbose/verb}{\texttt{ verb}} using \href{https://github.com/jonschlinkert/markdown-toc}{\texttt{ markdown-\/toc}})\+\_\+\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12214}{}\doxysection{Install}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12214}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save fill-\/range }

\end{DoxyCode}


Install with \href{https://yarnpkg.com}{\texttt{ yarn}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ yarn add fill-\/range }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12215}{}\doxysection{Usage}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12215}
Expands numbers and letters, optionally using a {\ttfamily step} as the last argument. \+\_\+(\+Numbers may be defined as Java\+Script numbers or strings)\+\_\+.


\begin{DoxyCode}{0}
\DoxyCodeLine{var fill = require('fill-\/range');}
\DoxyCodeLine{fill(from, to[, step, options]);}
\DoxyCodeLine{}
\DoxyCodeLine{// examples}
\DoxyCodeLine{console.log(fill('1', '10'));                  //=> '[ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10' ]'}
\DoxyCodeLine{console.log(fill('1', '10', \{toRegex: true\})); //=> [1-\/9]|10 }

\end{DoxyCode}


{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily from}\+: $\ast$$\ast$\{String$\vert$\+Number\}$\ast$$\ast$ the number or letter to start with
\item {\ttfamily to}\+: $\ast$$\ast$\{String$\vert$\+Number\}$\ast$$\ast$ the number or letter to end with
\item {\ttfamily step}\+: $\ast$$\ast$\{String$\vert$\+Number$\vert$\+Object$\vert$\+Function\}$\ast$$\ast$ Optionally pass a \href{\#optionsstep}{\texttt{ step}} to use.
\item {\ttfamily options}\+: $\ast$$\ast$\{Object$\vert$\+Function\}$\ast$$\ast$\+: See all available \href{\#options}{\texttt{ options}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12216}{}\doxysection{Examples}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12216}
By default, an array of values is returned.

{\bfseries{Alphabetical ranges}}


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(fill('a', 'e')); //=> ['a', 'b', 'c', 'd', 'e']}
\DoxyCodeLine{console.log(fill('A', 'E')); //=> [ 'A', 'B', 'C', 'D', 'E' ] }

\end{DoxyCode}


{\bfseries{Numerical ranges}}

Numbers can be defined as actual numbers or strings.


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(fill(1, 5));     //=> [ 1, 2, 3, 4, 5 ]}
\DoxyCodeLine{console.log(fill('1', '5')); //=> [ 1, 2, 3, 4, 5 ] }

\end{DoxyCode}


{\bfseries{Negative ranges}}

Numbers can be defined as actual numbers or strings.


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(fill('-\/5', '-\/1')); //=> [ '-\/5', '-\/4', '-\/3', '-\/2', '-\/1' ]}
\DoxyCodeLine{console.log(fill('-\/5', '5')); //=> [ '-\/5', '-\/4', '-\/3', '-\/2', '-\/1', '0', '1', '2', '3', '4', '5' ] }

\end{DoxyCode}


{\bfseries{Steps (increments)}}


\begin{DoxyCode}{0}
\DoxyCodeLine{// numerical ranges with increments}
\DoxyCodeLine{console.log(fill('0', '25', 4)); //=> [ '0', '4', '8', '12', '16', '20', '24' ]}
\DoxyCodeLine{console.log(fill('0', '25', 5)); //=> [ '0', '5', '10', '15', '20', '25' ]}
\DoxyCodeLine{console.log(fill('0', '25', 6)); //=> [ '0', '6', '12', '18', '24' ]}
\DoxyCodeLine{}
\DoxyCodeLine{// alphabetical ranges with increments}
\DoxyCodeLine{console.log(fill('a', 'z', 4)); //=> [ 'a', 'e', 'i', 'm', 'q', 'u', 'y' ]}
\DoxyCodeLine{console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ]}
\DoxyCodeLine{console.log(fill('a', 'z', 6)); //=> [ 'a', 'g', 'm', 's', 'y' ] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12217}{}\doxysection{Options}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12217}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12218}{}\doxysubsection{options.\+step}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12218}
{\bfseries{Type}}\+: {\ttfamily number} (formatted as a string or number)

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

{\bfseries{Description}}\+: The increment to use for the range. Can be used with letters or numbers.

{\bfseries{Example(s)}}


\begin{DoxyCode}{0}
\DoxyCodeLine{// numbers}
\DoxyCodeLine{console.log(fill('1', '10', 2)); //=> [ '1', '3', '5', '7', '9' ]}
\DoxyCodeLine{console.log(fill('1', '10', 3)); //=> [ '1', '4', '7', '10' ]}
\DoxyCodeLine{console.log(fill('1', '10', 4)); //=> [ '1', '5', '9' ]}
\DoxyCodeLine{}
\DoxyCodeLine{// letters}
\DoxyCodeLine{console.log(fill('a', 'z', 5)); //=> [ 'a', 'f', 'k', 'p', 'u', 'z' ]}
\DoxyCodeLine{console.log(fill('a', 'z', 7)); //=> [ 'a', 'h', 'o', 'v' ]}
\DoxyCodeLine{console.log(fill('a', 'z', 9)); //=> [ 'a', 'j', 's' ] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12219}{}\doxysubsection{options.\+strict\+Ranges}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12219}
{\bfseries{Type}}\+: {\ttfamily boolean}

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

{\bfseries{Description}}\+: By default, {\ttfamily null} is returned when an invalid range is passed. Enable this option to throw a {\ttfamily Range\+Error} on invalid ranges.

{\bfseries{Example(s)}}

The following are all invalid\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{fill('1.1', '2');   // decimals not supported in ranges}
\DoxyCodeLine{fill('a', '2');     // incompatible range values}
\DoxyCodeLine{fill(1, 10, 'foo'); // invalid "{}step"{} argument }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12220}{}\doxysubsection{options.\+stringify}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12220}
{\bfseries{Type}}\+: {\ttfamily boolean}

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

{\bfseries{Description}}\+: Cast all returned values to strings. By default, integers are returned as numbers.

{\bfseries{Example(s)}}


\begin{DoxyCode}{0}
\DoxyCodeLine{console.log(fill(1, 5));                    //=> [ 1, 2, 3, 4, 5 ]}
\DoxyCodeLine{console.log(fill(1, 5, \{stringify: true\})); //=> [ '1', '2', '3', '4', '5' ] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12221}{}\doxysubsection{options.\+to\+Regex}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12221}
{\bfseries{Type}}\+: {\ttfamily boolean}

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

{\bfseries{Description}}\+: Create a regex-\/compatible source string, instead of expanding values to an array.

{\bfseries{Example(s)}}


\begin{DoxyCode}{0}
\DoxyCodeLine{// alphabetical range}
\DoxyCodeLine{console.log(fill('a', 'e', \{toRegex: true\})); //=> '[a-\/e]'}
\DoxyCodeLine{// alphabetical with step}
\DoxyCodeLine{console.log(fill('a', 'z', 3, \{toRegex: true\})); //=> 'a|d|g|j|m|p|s|v|y'}
\DoxyCodeLine{// numerical range}
\DoxyCodeLine{console.log(fill('1', '100', \{toRegex: true\})); //=> '[1-\/9]|[1-\/9][0-\/9]|100'}
\DoxyCodeLine{// numerical range with zero padding}
\DoxyCodeLine{console.log(fill('000001', '100000', \{toRegex: true\}));}
\DoxyCodeLine{//=> '0\{5\}[1-\/9]|0\{4\}[1-\/9][0-\/9]|0\{3\}[1-\/9][0-\/9]\{2\}|0\{2\}[1-\/9][0-\/9]\{3\}|0[1-\/9][0-\/9]\{4\}|100000' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12222}{}\doxysubsection{options.\+transform}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12222}
{\bfseries{Type}}\+: {\ttfamily function}

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

{\bfseries{Description}}\+: Customize each value in the returned array (or \href{\#optionstoRegex}{\texttt{ string}}). \+\_\+(you can also pass this function as the last argument to {\ttfamily fill()})\+\_\+.

{\bfseries{Example(s)}}


\begin{DoxyCode}{0}
\DoxyCodeLine{// increase padding by two}
\DoxyCodeLine{var arr = fill('01', '05', function(val, a, b, step, idx, arr, options) \{}
\DoxyCodeLine{  return repeat('0', (options.maxLength + 2) -\/ val.length) + val;}
\DoxyCodeLine{\});}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(arr);}
\DoxyCodeLine{//=> ['0001', '0002', '0003', '0004', '0005'] }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12223}{}\doxysection{About}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12223}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12224}{}\doxysubsection{Related projects}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12224}

\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/expand-range}{\texttt{ expand-\/range}}\+: Fast, bash-\/like range expansion. Expand a range of numbers or letters, uppercase or lowercase. See… \href{https://github.com/jonschlinkert/expand-range}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/expand-range}{\texttt{ homepage}}
\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/to-regex-range}{\texttt{ to-\/regex-\/range}}\+: Pass two numbers, get a regex-\/compatible source string for matching ranges. Validated against more than… \href{https://github.com/jonschlinkert/to-regex-range}{\texttt{ more}} $\vert$ \href{https://github.com/jonschlinkert/to-regex-range}{\texttt{ homepage}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12225}{}\doxysubsection{Contributing}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12225}
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_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12226}{}\doxysubsection{Contributors}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12226}
\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}}    }\\\cline{1-2}
\endfirsthead
\hline
\endfoot
\hline
\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Commits}}   }&\PBS\centering \cellcolor{\tableheadbgcolor}\textbf{ {\bfseries{Contributor}}    }\\\cline{1-2}
\endhead
103   &\href{https://github.com/jonschlinkert}{\texttt{ jonschlinkert}}    \\\cline{1-2}
2   &\href{https://github.com/paulmillr}{\texttt{ paulmillr}}    \\\cline{1-2}
1   &\href{https://github.com/edorivai}{\texttt{ edorivai}}    \\\cline{1-2}
1   &\href{https://github.com/wtgtybhertgeghgtwtg}{\texttt{ wtgtybhertgeghgtwtg}}   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12227}{}\doxysubsection{Building docs}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12227}
\+\_\+(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}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12228}{}\doxysubsection{Running tests}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12228}
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}
\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12229}{}\doxysubsection{Author}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12229}
{\bfseries{Jon Schlinkert}}


\begin{DoxyItemize}
\item \href{https://github.com/jonschlinkert}{\texttt{ github/jonschlinkert}}
\item \href{https://twitter.com/jonschlinkert}{\texttt{ twitter/jonschlinkert}}
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12230}{}\doxysubsection{License}\label{md_sfcode_node_modules_http_proxy_middleware_node_modules_fill_range_README_autotoc_md12230}
Copyright © 2017, \href{https://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \mbox{[}MIT License\mbox{]}(LICENSE).

\DoxyHorRuler{0}


{\itshape This file was generated by \href{https://github.com/verbose/verb-generate-readme}{\texttt{ verb-\/generate-\/readme}}, v0.\+5.\+0, on April 23, 2017.} 