Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
ansi-escape
Advanced tools
Readme
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
Type: Function
Accept arguments like util.format.
var csi = require('ansi-escape')
console.log(
csi.escape(
'Age: %d, Size: %j',
10,
{ h: 180, w: 80 }
)
)
Output
Age: 10, Size: {"h":180,"w":80}
Alias: cuu
, up
Moves the cursor n
cells up.
Alias: cud
, down
Moves the cursor n
cells down.
Alias: cuf
, forward
Moves the cursor n
cells forward.
Alias: cub
, back
Moves the cursor n
cells backward.
Alias: cha
, col
Moves the cursor to column n
.
Alias: cup
Moves the cursor to row n
, column m
.
Sugar: eraseDisplayEnd
, eraseDisplayStart
, eraseDisplayEntire
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).Sugar: eraseLineEnd
, eraseLineStart
, eraseLineEntire
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.
Alias: su
Scroll whole page up by n (default 1) lines. New lines are added at the bottom.
Alias: sd
Scroll whole page down by n (default 1) lines. New lines are added at the top.
Alias: scp
, saveCursor
Saves the cursor position.
Alias: rcp
, restoreCursor
Restores the cursor position.
Alias: hide
Hides the cursor.
Alias: show
Shows the cursor.
FAQs
ANSI escape codes for manipulating the terminal
The npm package ansi-escape receives a total of 3,608 weekly downloads. As such, ansi-escape popularity was classified as popular.
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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.