\begin{quote}
Wordwrap a string with \href{https://en.wikipedia.org/wiki/ANSI_escape_code\#Colors_and_Styles}{\texttt{ ANSI escape codes}} \end{quote}
\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md469}{}\doxysection{Install}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md469}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install wrap-\/ansi }

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const chalk = require('chalk');}
\DoxyCodeLine{const wrapAnsi = require('wrap-\/ansi');}
\DoxyCodeLine{}
\DoxyCodeLine{const input = 'The quick brown ' + chalk.red('fox jumped over ') +}
\DoxyCodeLine{    'the lazy ' + chalk.green('dog and then ran away with the unicorn.');}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(wrapAnsi(input, 20)); }

\end{DoxyCode}


\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md471}{}\doxysection{API}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md471}
\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md472}{}\doxysubsection{wrap\+Ansi(string, columns, options?)}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md472}
Wrap words to the specified column width.\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md473}{}\doxysubsubsection{string}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md473}
Type\+: {\ttfamily string}

String with ANSI escape codes. Like one styled by \href{https://github.com/chalk/chalk}{\texttt{ {\ttfamily chalk}}}. Newline characters will be normalized to {\ttfamily \textbackslash{}n}.\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md474}{}\doxysubsubsection{columns}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md474}
Type\+: {\ttfamily number}

Number of columns to wrap the text to.\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md475}{}\doxysubsubsection{options}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md475}
Type\+: {\ttfamily object}\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md476}{}\doxyparagraph{hard}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md476}
Type\+: {\ttfamily boolean}~\newline
 Default\+: {\ttfamily false}

By default the wrap is soft, meaning long words may extend past the column width. Setting this to {\ttfamily true} will make it hard wrap at the column width.\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md477}{}\doxyparagraph{word\+Wrap}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md477}
Type\+: {\ttfamily boolean}~\newline
 Default\+: {\ttfamily true}

By default, an attempt is made to split words at spaces, ensuring that they don\textquotesingle{}t extend past the configured columns. If word\+Wrap is {\ttfamily false}, each column will instead be completely filled splitting words as necessary.\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md478}{}\doxyparagraph{trim}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md478}
Type\+: {\ttfamily boolean}~\newline
 Default\+: {\ttfamily true}

Whitespace on all lines is removed by default. Set this option to {\ttfamily false} if you don\textquotesingle{}t want to trim.\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md479}{}\doxysection{Related}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md479}

\begin{DoxyItemize}
\item \href{https://github.com/chalk/slice-ansi}{\texttt{ slice-\/ansi}} -\/ Slice a string with ANSI escape codes
\item \href{https://github.com/sindresorhus/cli-truncate}{\texttt{ cli-\/truncate}} -\/ Truncate a string to a specific width in the terminal
\item \href{https://github.com/chalk/chalk}{\texttt{ chalk}} -\/ Terminal string styling done right
\item \href{https://github.com/mathiasbynens/jsesc}{\texttt{ jsesc}} -\/ Generate ASCII-\/only output from Unicode strings. Useful for creating test fixtures.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md480}{}\doxysection{Maintainers}\label{md_sfcode_node_modules__angular_compiler_cli_node_modules_wrap_ansi_readme_autotoc_md480}

\begin{DoxyItemize}
\item \href{https://github.com/sindresorhus}{\texttt{ Sindre Sorhus}}
\item \href{https://github.com/qix-}{\texttt{ Josh Junon}}
\item \href{https://github.com/bcoe}{\texttt{ Benjamin Coe}}
\end{DoxyItemize}

\DoxyHorRuler{0}


 {\bfseries{ \href{https://tidelift.com/subscription/pkg/npm-wrap_ansi?utm_source=npm-wrap-ansi&utm_medium=referral&utm_campaign=readme}{\texttt{ Get professional support for this package with a Tidelift subscription}} }} ~\newline
 \textsubscript{ Tidelift helps make open source sustainable for maintainers while giving companies~\newline
assurances about security, maintenance, and licensing for their dependencies. }  