Module basic module

Module tty

tty module

Instructions:

1
const tty = require('tty');

Static function

isatty

Query whether it is a command interactive window

1
static Boolean tty.isatty(Integer fd);

Call parameters:

  • fd : Integer, file descriptor

Return result:

  • Boolean , true if the file descriptor is associated with a terminal window, otherwise false