
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
ansi-escape
Advanced tools
ANSI escape codes for manipulating the terminal
var csi = require('ansi-escape')
console.log('1'.repeat(8))
console.log(
csi
// underline text
.underline
// red text
.red
// move cursor one line up
.cursorUp
// move cursor 2 cells forward
.cursorForward(2)
// the text to be escaped
.escape('2'.repeat(4))
)
Output:
Moves the cursor n
cells up.
Moves the cursor n
cells down.
Moves the cursor n
cells forward.
Moves the cursor n
cells backward.
Moves the cursor to column n
.
Moves the cursor to row n
, column m
.
Clears part of the screen.
n
is 0 (or missing), clear from cursor to end of screen.n
is 1, clear from cursor to beginning of the screen.n
is 2, clear entire screen (and moves cursor to upper left on DOS ANSI.SYS).Erases part of the line.
n
is 0 (or missing), clear from cursor to the end of the line.n
is 1, clear from cursor to beginning of the line.n
is 2, clear entire line.Cursor position does not change.
Scroll whole page up by n (default 1) lines. New lines are added at the bottom.
Scroll whole page down by n (default 1) lines. New lines are added at the top.
Saves the cursor position.
Restores the cursor position.
Hides the cursor.
Shows the cursor.
FAQs
ANSI escape codes for manipulating the terminal
We found that ansi-escape demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.