模塊tty
tty 模塊
使用方法:
1const tty = require('tty');
靜態函數
isatty
查詢是否是命令交互窗口
1static Boolean tty.isatty(Integer fd);
調用參數:
- fd: Integer, 文件描述符
返回結果:
- Boolean, 如果文件描述符同一個終端窗口關聯則返回true ,否則返回false
tty 模塊
使用方法:
1const tty = require('tty');
查詢是否是命令交互窗口
1static Boolean tty.isatty(Integer fd);
調用參數:
返回結果: