Node.js/process:修订间差异
来自康健生活
创建页面,内容为“== 标题文字 == == error == * TypeError: process.stdin.setRawMode is not a function : <syntaxhighlight lang="javascript"> if (process.stdin.isTTY) { process.std…” |
|||
| 第5行: | 第5行: | ||
if (process.stdin.isTTY) { | if (process.stdin.isTTY) { | ||
process.stdin.setRawMode(true); | process.stdin.setRawMode(true); | ||
}</syntaxhighlight> | }</syntaxhighlight><br> | ||
检测 process.stdout.isTTY<br> | |||
{{Shc_out|<syntaxhighlight lang="bash"> | |||
node -p -e "Boolean(process.stdout.isTTY)"</syntaxhighlight>|<syntaxhighlight lang="bash">true | |||
</syntaxhighlight>|$|/home/kangkk}} | |||