Headless xterm emulator using vt (terminal.js).
Want to see pretty graphs? Log in now!
npm install headless-terminal
|12||downloads in the last day|
|168||downloads in the last week|
|600||downloads in the last month|
|Last Published By|
|Version||0.4.0 last updated 2 months ago|
|Dependents||livetty, shux, tty2js, ttycast|
new HeadlessTerminal(cols, rows)
A headless terminal is a terminal with an internal screen buffer.
When the display is changed, the
change event is emitted
with the display buffer as an argument.
Note: Since v0.3 the API has been completely changed.
var HeadlessTerminal = require('headless-terminal') var terminal = new HeadlessTerminal(80, 25) terminal.write('write some data and ansi code') console.log(terminal.displayBuffer.toString())
The underlying screen-buffer
HeadlessTerminal inherits EventEmitter.
Writes some thing to the terminal. After that, a change event will be emitted.
Resizes the size of the terminal. After that, a change event will be emitted.
Emitted when something is written to the terminal. The first argument will be the underlying screen-buffer.
The ScreenBuffer class.