\begin{quote}
\href{http://www.termsys.demon.co.uk/vtansi.htm}{\texttt{ ANSI escape codes}} for manipulating the terminal \end{quote}
\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2995}{}\doxysection{Install}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2995}

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

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

\begin{DoxyCode}{0}
\DoxyCodeLine{const ansiEscapes = require('ansi-\/escapes');}
\DoxyCodeLine{}
\DoxyCodeLine{// Moves the cursor two rows up and to the left}
\DoxyCodeLine{process.stdout.write(ansiEscapes.cursorUp(2) + ansiEscapes.cursorLeft);}
\DoxyCodeLine{//=> '\(\backslash\)u001B[2A\(\backslash\)u001B[1000D' }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2997}{}\doxysection{API}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2997}
\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2998}{}\doxysubsection{cursor\+To(x, y?)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2998}
Set the absolute position of the cursor. {\ttfamily x0} {\ttfamily y0} is the top left of the screen.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2999}{}\doxysubsection{cursor\+Move(x, y?)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md2999}
Set the position of the cursor relative to its current position.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3000}{}\doxysubsection{cursor\+Up(count)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3000}
Move cursor up a specific amount of rows. Default is {\ttfamily 1}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3001}{}\doxysubsection{cursor\+Down(count)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3001}
Move cursor down a specific amount of rows. Default is {\ttfamily 1}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3002}{}\doxysubsection{cursor\+Forward(count)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3002}
Move cursor forward a specific amount of columns. Default is {\ttfamily 1}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3003}{}\doxysubsection{cursor\+Backward(count)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3003}
Move cursor backward a specific amount of columns. Default is {\ttfamily 1}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3004}{}\doxysubsection{cursor\+Left}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3004}
Move cursor to the left side.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3005}{}\doxysubsection{cursor\+Save\+Position}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3005}
Save cursor position.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3006}{}\doxysubsection{cursor\+Restore\+Position}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3006}
Restore saved cursor position.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3007}{}\doxysubsection{cursor\+Get\+Position}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3007}
Get cursor position.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3008}{}\doxysubsection{cursor\+Next\+Line}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3008}
Move cursor to the next line.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3009}{}\doxysubsection{cursor\+Prev\+Line}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3009}
Move cursor to the previous line.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3010}{}\doxysubsection{cursor\+Hide}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3010}
Hide cursor.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3011}{}\doxysubsection{cursor\+Show}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3011}
Show cursor.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3012}{}\doxysubsection{erase\+Lines(count)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3012}
Erase from the current cursor position up the specified amount of rows.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3013}{}\doxysubsection{erase\+End\+Line}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3013}
Erase from the current cursor position to the end of the current line.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3014}{}\doxysubsection{erase\+Start\+Line}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3014}
Erase from the current cursor position to the start of the current line.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3015}{}\doxysubsection{erase\+Line}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3015}
Erase the entire current line.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3016}{}\doxysubsection{erase\+Down}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3016}
Erase the screen from the current line down to the bottom of the screen.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3017}{}\doxysubsection{erase\+Up}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3017}
Erase the screen from the current line up to the top of the screen.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3018}{}\doxysubsection{erase\+Screen}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3018}
Erase the screen and move the cursor the top left position.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3019}{}\doxysubsection{scroll\+Up}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3019}
Scroll display up one line.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3020}{}\doxysubsection{scroll\+Down}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3020}
Scroll display down one line.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3021}{}\doxysubsection{clear\+Screen}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3021}
Clear the terminal screen. (Viewport)\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3022}{}\doxysubsection{clear\+Terminal}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3022}
Clear the whole terminal, including scrollback buffer. (Not just the visible part of it)\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3023}{}\doxysubsection{beep}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3023}
Output a beeping sound.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3024}{}\doxysubsection{link(text, url)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3024}
Create a clickable link.

\href{https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda}{\texttt{ Supported terminals.}} Use \href{https://github.com/jamestalmage/supports-hyperlinks}{\texttt{ {\ttfamily supports-\/hyperlinks}}} to detect link support.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3025}{}\doxysubsection{image(file\+Path, options?)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3025}
Display an image.

{\itshape Currently only supported on i\+Term2 $>$=3}

See \href{https://github.com/sindresorhus/term-img}{\texttt{ term-\/img}} for a higher-\/level module.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3026}{}\doxysubsubsection{input}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3026}
Type\+: {\ttfamily Buffer}

Buffer of an image. Usually read in with {\ttfamily fs.\+read\+File()}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3027}{}\doxysubsubsection{options}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3027}
Type\+: {\ttfamily object}\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3028}{}\doxyparagraph{width}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3028}
\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3029}{}\doxyparagraph{height}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3029}
Type\+: {\ttfamily string $\vert$ number}

The width and height are given as a number followed by a unit, or the word \char`\"{}auto\char`\"{}.


\begin{DoxyItemize}
\item {\ttfamily N}\+: N character cells.
\item {\ttfamily Npx}\+: N pixels.
\item {\ttfamily N\%}\+: N percent of the session\textquotesingle{}s width or height.
\item {\ttfamily auto}\+: The image\textquotesingle{}s inherent size will be used to determine an appropriate dimension.
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3030}{}\doxyparagraph{preserve\+Aspect\+Ratio}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3030}
Type\+: {\ttfamily boolean}\textbackslash{} Default\+: {\ttfamily true}\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3031}{}\doxysubsection{i\+Term.\+set\+Cwd(path?)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3031}
Type\+: {\ttfamily string}\textbackslash{} Default\+: {\ttfamily process.\+cwd()}

\href{https://www.iterm2.com/documentation-escape-codes.html}{\texttt{ Inform i\+Term2}} of the current directory to help semantic history and enable \href{https://coderwall.com/p/b7e82q/quickly-open-files-in-iterm-with-cmd-click}{\texttt{ Cmd-\/clicking relative paths}}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3032}{}\doxysubsection{i\+Term.\+annotation(message, options?)}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3032}
Creates an escape code to display an \char`\"{}annotation\char`\"{} in i\+Term2.

An annotation looks like this when shown\+:



See the \href{https://iterm2.com/documentation-escape-codes.html}{\texttt{ i\+Term Proprietary Escape Codes documentation}} for more information.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3033}{}\doxysubsubsection{message}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3033}
Type\+: {\ttfamily string}

The message to display within the annotation.

The {\ttfamily $\vert$} character is disallowed and will be stripped.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3034}{}\doxysubsubsection{options}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3034}
Type\+: {\ttfamily object}\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3035}{}\doxyparagraph{length}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3035}
Type\+: {\ttfamily number}\textbackslash{} Default\+: The remainder of the line

Nonzero number of columns to annotate.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3036}{}\doxyparagraph{x}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3036}
Type\+: {\ttfamily number}\textbackslash{} Default\+: Cursor position

Starting X coordinate.

Must be used with {\ttfamily y} and {\ttfamily length}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3037}{}\doxyparagraph{y}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3037}
Type\+: {\ttfamily number}\textbackslash{} Default\+: Cursor position

Starting Y coordinate.

Must be used with {\ttfamily x} and {\ttfamily length}.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3038}{}\doxyparagraph{is\+Hidden}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3038}
Type\+: {\ttfamily boolean}\textbackslash{} Default\+: {\ttfamily false}

Create a \char`\"{}hidden\char`\"{} annotation.

Annotations created this way can be shown using the \char`\"{}\+Show Annotations\char`\"{} i\+Term command.\hypertarget{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3039}{}\doxysection{Related}\label{md_sfcode_node_modules_ansi_escapes_readme_autotoc_md3039}

\begin{DoxyItemize}
\item \href{https://github.com/chalk/ansi-styles}{\texttt{ ansi-\/styles}} -\/ ANSI escape codes for styling strings in the terminal
\end{DoxyItemize}

\DoxyHorRuler{0}


 {\bfseries{ \href{https://tidelift.com/subscription/pkg/npm-ansi-escapes?utm_source=npm-ansi-escapes&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. }  