This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tty = require('tty'); | |
var util = require('util'); | |
/* | |
console.log('isTTY: ' + process.stdout.isTTY); // 当标准输出为终端时,isTTY 就是为 true。 | |
console.log(util.inspect(process.stdin)); | |
console.log('isatty 0: ' + tty.isatty(0)); | |
console.log('isatty 1: ' + tty.isatty(1)); | |
console.log('isatty 2: ' + tty.isatty(2)); // 若 fd 关联于中端则返回 true,反之返回 false | |
*/ |