\begin{quote}
Repeat the given string n times. Fastest implementation for repeating a string. \end{quote}
\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24170}{}\doxysection{Install}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24170}
Install with \href{https://www.npmjs.com/}{\texttt{ npm}}\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install -\/-\/save repeat-\/string }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24171}{}\doxysection{Usage}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24171}
\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24172}{}\doxysubsection{$<$a href=\char`\"{}index.\+js\#\+L41\char`\"{}$>$repeat$<$/a$>$}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24172}
Repeat the given {\ttfamily string} the specified {\ttfamily number} of times.

{\bfseries{Example\+:}}

{\bfseries{Example}}


\begin{DoxyCode}{0}
\DoxyCodeLine{var repeat = require('repeat-\/string');}
\DoxyCodeLine{repeat('A', 5);}
\DoxyCodeLine{//=> AAAAA }

\end{DoxyCode}


{\bfseries{Params}}


\begin{DoxyItemize}
\item {\ttfamily string} $\ast$$\ast$\{String\}$\ast$$\ast$\+: The string to repeat
\item {\ttfamily number} $\ast$$\ast$\{Number\}$\ast$$\ast$\+: The number of times to repeat the string
\item {\ttfamily returns} $\ast$$\ast$\{String\}$\ast$$\ast$\+: Repeated string
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24173}{}\doxysection{Benchmarks}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24173}
Repeat string is significantly faster than the native method (which is itself faster than \href{https://github.com/sindresorhus/repeating}{\texttt{ repeating}})\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{\# 2x}
\DoxyCodeLine{repeat-\/string  █████████████████████████  (26,953,977 ops/sec)}
\DoxyCodeLine{repeating      █████████                  (9,855,695 ops/sec)}
\DoxyCodeLine{native         ██████████████████         (19,453,895 ops/sec)}
\DoxyCodeLine{}
\DoxyCodeLine{\# 3x}
\DoxyCodeLine{repeat-\/string  █████████████████████████  (19,445,252 ops/sec)}
\DoxyCodeLine{repeating      ███████████                (8,661,565 ops/sec)}
\DoxyCodeLine{native         ████████████████████       (16,020,598 ops/sec)}
\DoxyCodeLine{}
\DoxyCodeLine{\# 10x}
\DoxyCodeLine{repeat-\/string  █████████████████████████  (23,792,521 ops/sec)}
\DoxyCodeLine{repeating      █████████                  (8,571,332 ops/sec)}
\DoxyCodeLine{native         ███████████████            (14,582,955 ops/sec)}
\DoxyCodeLine{}
\DoxyCodeLine{\# 50x}
\DoxyCodeLine{repeat-\/string  █████████████████████████  (23,640,179 ops/sec)}
\DoxyCodeLine{repeating      █████                      (5,505,509 ops/sec)}
\DoxyCodeLine{native         ██████████                 (10,085,557 ops/sec)}
\DoxyCodeLine{}
\DoxyCodeLine{\# 250x}
\DoxyCodeLine{repeat-\/string  █████████████████████████  (23,489,618 ops/sec)}
\DoxyCodeLine{repeating      ████                       (3,962,937 ops/sec)}
\DoxyCodeLine{native         ████████                   (7,724,892 ops/sec)}
\DoxyCodeLine{}
\DoxyCodeLine{\# 2000x}
\DoxyCodeLine{repeat-\/string  █████████████████████████  (20,315,172 ops/sec)}
\DoxyCodeLine{repeating      ████                       (3,297,079 ops/sec)}
\DoxyCodeLine{native         ███████                    (6,203,331 ops/sec)}
\DoxyCodeLine{}
\DoxyCodeLine{\# 20000x}
\DoxyCodeLine{repeat-\/string  █████████████████████████  (23,382,915 ops/sec)}
\DoxyCodeLine{repeating      ███                        (2,980,058 ops/sec)}
\DoxyCodeLine{native         █████                      (5,578,808 ops/sec) }

\end{DoxyCode}


{\bfseries{Run the benchmarks}}

Install dev dependencies\+:


\begin{DoxyCode}{0}
\DoxyCodeLine{npm i -\/d \&\& node benchmark }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24174}{}\doxysection{About}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24174}
\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24175}{}\doxysubsection{Related projects}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24175}
\href{https://www.npmjs.com/package/repeat-element}{\texttt{ repeat-\/element}}\+: Create an array by repeating the given value n times. $\vert$ \href{https://github.com/jonschlinkert/repeat-element}{\texttt{ homepage}}\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24176}{}\doxysubsection{Contributing}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24176}
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_repeat_string_README_autotoc_md24177}{}\doxysubsection{Contributors}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24177}
\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
51   &\href{https://github.com/jonschlinkert}{\texttt{ jonschlinkert}}    \\\cline{1-2}
2   &\href{https://github.com/LinusU}{\texttt{ LinusU}}    \\\cline{1-2}
2   &\href{https://github.com/tbusser}{\texttt{ tbusser}}    \\\cline{1-2}
1   &\href{https://github.com/doowb}{\texttt{ doowb}}    \\\cline{1-2}
1   &\href{https://github.com/wooorm}{\texttt{ wooorm}}   \\\cline{1-2}
\end{longtabu}
\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24178}{}\doxysubsection{Building docs}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24178}
\+\_\+(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_repeat_string_README_autotoc_md24179}{}\doxysubsection{Running tests}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24179}
Install dev dependencies\+:


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

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_repeat_string_README_autotoc_md24180}{}\doxysubsection{Author}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24180}
{\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_repeat_string_README_autotoc_md24181}{}\doxysubsection{License}\label{md_sfcode_node_modules_repeat_string_README_autotoc_md24181}
Copyright © 2016, \href{http://github.com/jonschlinkert}{\texttt{ Jon Schlinkert}}. Released under the \href{https://github.com/jonschlinkert/repeat-string/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 October 23, 2016.} 