tty library

Node.js "process" module bindings.

The tty module provides the TTYReadStream and TTYWriteStream classes. In most cases, it will not be necessary or possible to use this module directly. However, it can be accessed using:

import 'package:node_interop/tty.dart';

void main() {
  // For example:
  print(tty.isatty(fileDescriptor));
}

When Node.js detects that it is being run with a text terminal ("TTY") attached, process.stdin will, by default, be initialized as an instance of TTYReadStream and both process.stdout and process.stderr will, by default be instances of TTYWriteStream. The preferred method of determining whether Node.js is being run within a TTY context is to check that the value of the process.stdout.isTTY property is true.

In most cases, there should be little to no reason for an application to manually create instances of the TTYReadStream and TTYWriteStream classes.

Classes

TTY
TTYReadStream
Represents the readable side of a TTY.
TTYWriteStream

Properties

tty TTY
no setter