File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ Breaking changes:
88
99New features:
1010
11+ - Added ` stdinIsTTY ` as the counterpart of ` process.stdin.isTTY ` (#31 by @matoruru )
12+
1113Bugfixes:
1214
1315Other improvements:
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ module Node.Process
2020 , stdin
2121 , stdout
2222 , stderr
23+ , stdinIsTTY
2324 , stdoutIsTTY
2425 , stderrIsTTY
2526 , version
@@ -151,6 +152,11 @@ stdout = process.stdout
151152stderr :: Writable ()
152153stderr = process.stderr
153154
155+ -- | Check whether the standard input stream appears to be attached to a TTY.
156+ -- | It is a good idea to check this before processing the input data from stdin.
157+ stdinIsTTY :: Boolean
158+ stdinIsTTY = process.stdin.isTTY
159+
154160-- | Check whether the standard output stream appears to be attached to a TTY.
155161-- | It is a good idea to check this before printing ANSI codes to stdout
156162-- | (e.g. for coloured text in the terminal).
You can’t perform that action at this time.
0 commit comments