Socket
Socket
Sign inDemoInstall

headless-terminal

Package Overview
Dependencies
2
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    headless-terminal

Headless xterm emulator using vt (terminal.js).


Version published
Weekly downloads
12
decreased by-70%
Maintainers
1
Install size
113 kB
Created
Weekly downloads
 

Readme

Source

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.

Usage

var HeadlessTerminal = require('headless-terminal')
var terminal = new HeadlessTerminal(80, 25)
terminal.write('write some data and ansi code')
console.log(terminal.displayBuffer.toString())

Attributes

displayBuffer

The underlying screen-buffer

API

HeadlessTerminal inherits EventEmitter.

write(whatever)

Writes some thing to the terminal. After that, a change event will be emitted.

resize(cols, rows)

Resizes the size of the terminal. After that, a change event will be emitted.

Events

'change' (buffer)

Emitted when something is written to the terminal. The first argument will be the underlying screen-buffer.

Static Members

HeadlessTerminal.ScreenBuffer

The ScreenBuffer class.

License

MIT

FAQs

Last updated on 15 Feb 2014

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc