ansi-escapes
- Version 6.2.0
- Published
- 17.3 kB
- 1 dependency
- MIT license
Install
npm i ansi-escapes
yarn add ansi-escapes
pnpm add ansi-escapes
Overview
ANSI escape codes for manipulating the terminal
Index
Variables
Type Aliases
Variables
variable ansiEscapes
const ansiEscapes: { cursorTo(x: number, y?: number): string; cursorMove(x: number, y?: number): string; cursorUp(count?: number): string; cursorDown(count?: number): string; cursorForward(count?: number): string; cursorBackward(count?: number): string; cursorLeft: string; cursorSavePosition: string; cursorRestorePosition: string; cursorGetPosition: string; cursorNextLine: string; cursorPrevLine: string; cursorHide: string; cursorShow: string; eraseLines(count: number): string; eraseEndLine: string; eraseStartLine: string; eraseLine: string; eraseDown: string; eraseUp: string; eraseScreen: string; scrollUp: string; scrollDown: string; clearScreen: string; clearTerminal: string; enterAlternativeScreen: string; exitAlternativeScreen: string; beep: string; link(text: string, url: string): string; image(buffer: Buffer, options?: ImageOptions): string; iTerm: { setCwd(cwd?: string): string; annotation(message: string, options?: AnnotationOptions): string; };};
Type Aliases
type AnnotationOptions
type AnnotationOptions = { /** Nonzero number of columns to annotate.
Default: The remainder of the line. */ readonly length?: number;
/** Starting X coordinate.
Must be used with `y` and `length`.
Default: The cursor position */ readonly x?: number;
/** Starting Y coordinate.
Must be used with `x` and `length`.
Default: Cursor position. */ readonly y?: number;
/** Create a "hidden" annotation.
Annotations created this way can be shown using the "Show Annotations" iTerm command. */ readonly isHidden?: boolean;};
type ImageOptions
type ImageOptions = { /** The width is given as a number followed by a unit, or the word `'auto'`.
- `N`: N character cells. - `Npx`: N pixels. - `N%`: N percent of the session's width or height. - `auto`: The image's inherent size will be used to determine an appropriate dimension. */ readonly width?: LiteralUnion<'auto', number | string>;
/** The height is given as a number followed by a unit, or the word `'auto'`.
- `N`: N character cells. - `Npx`: N pixels. - `N%`: N percent of the session's width or height. - `auto`: The image's inherent size will be used to determine an appropriate dimension. */ readonly height?: LiteralUnion<'auto', number | string>;
/** @default true */ readonly preserveAspectRatio?: boolean;};
Package Files (1)
Dependencies (1)
Dev Dependencies (4)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/ansi-escapes
.
- Markdown[](https://www.jsdocs.io/package/ansi-escapes)
- HTML<a href="https://www.jsdocs.io/package/ansi-escapes"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 1586 ms. - Missing or incorrect documentation? Open an issue for this package.