New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

node-ansi

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-ansi

utility for displaying ANSI color and handling CSI screen interactions

latest
Source
npmnpm
Version
1.3.0
Version published
Maintainers
1
Created
Source

node-ansi

ANSI CSI library for node.js

CSI API:

this library contains the necessary methods to use ANSI positioning and coloring
in a node.js application. 

PROPERTIES:

/* foreground colors */
fg:
	black, red, green, yellow, blue, magenta, cyan,
	lightgray, darkgray, lightred, lightgreen, lightyellow,
	lightblue, lightmagenta, lightcyan, white

/* background colors */
bg:
	black, red, green, yellow, blue, magenta, cyan, white

/* "normal" attributes */	
normal

/* attribute (writes to stdout) getter/setter */
attributes

METHODS:

gotoxy(x,y)		// go to screen position x,y
getxy()			// return current screen position (broken)
pushxy(name,x,y)	// store current position (optional name)
popxy(name)		// restore saved position (optional name)
up(n)			// move cursor up n spaces
down(n)			// move cursor down n spaces
left(n)			// move cursor left n spaces
right(n)		// move cursor right n spaces
ins(n)			// insert n spaces
del(n)			// delete n spaces
clear()			// clear the screen
cleartoeol()		// clear to the end of the line
home()			// goto x=1, y=1
write(str)		// output a string to stdout
strlen(str)		// return the length of a string minus ANSI codes

Keywords

utility

FAQs

Package last updated on 19 Oct 2016

Did you know?

Socket

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.

Install

Related posts