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 results:

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