1.0.2 • Published 11 years ago

js-csi v1.0.2

Weekly downloads
2
License
-
Repository
github
Last release
11 years ago

#CSI

A little boilerplate is helpful to really get going with a UI in the terminal. These are the most basic functions you may want:

##Usage

npm install js-csi
	var CSI = require('js-csi');

##API

###Plumbing

####CSI.write(text)

Writes to process.stdout

####CSI.apply(arg)

Performs the command, e.g.

CSI.apply('10A'); //Moves cursor up ten lines

###Porcelain

####CSI.move(line, col)

Moves cursor to line, column. Column is optional (default: 1)

CSI.move(7,11); //Moves cursor to line 7, column 11

####CSI.hide()

Hides the cursor

####CSI.show()

Shows the cursor

####CSI.clear(line)

Clears the given line. If no line is supplied, clears the entire screen

CSI.clear(4); //Clears line 4
CSI.clear(); //Clears terminal screen
1.0.2

11 years ago

1.0.1

11 years ago

1.0.0

11 years ago