@@ -15,18 +15,6 @@ in a TTY context is to check `process.stdout.isTTY`:
15
15
$ node -p -e "Boolean(process.stdout.isTTY)" | cat
16
16
false
17
17
18
-
19
- ## tty.isatty(fd)
20
-
21
- Returns ` true ` or ` false ` depending on if the ` fd ` is associated with a
22
- terminal.
23
-
24
-
25
- ## tty.setRawMode(mode)
26
-
27
- Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.
28
-
29
-
30
18
## Class: ReadStream
31
19
32
20
A ` net.Socket ` subclass that represents the readable portion of a tty. In normal
@@ -44,23 +32,14 @@ of the `tty.ReadStream` instance.
44
32
` tty.ReadStream ` to act either as a raw device or default. ` isRaw ` will be set
45
33
to the resulting mode.
46
34
35
+ [ tty.ReadStream#setRawMode ] : #tty_rs_setrawmode_mode
47
36
48
37
## Class: WriteStream
49
38
50
39
A ` net.Socket ` subclass that represents the writable portion of a tty. In normal
51
40
circumstances, ` process.stdout ` will be the only ` tty.WriteStream ` instance
52
41
ever created (and only when ` isatty(1) ` is true).
53
42
54
- ### ws.columns
55
-
56
- A ` Number ` that gives the number of columns the TTY currently has. This property
57
- gets updated on "resize" events.
58
-
59
- ### ws.rows
60
-
61
- A ` Number ` that gives the number of rows the TTY currently has. This property
62
- gets updated on "resize" events.
63
-
64
43
### Event: 'resize'
65
44
66
45
` function () {} `
@@ -73,5 +52,21 @@ has changed.
73
52
console.log(process.stdout.columns + 'x' + process.stdout.rows);
74
53
});
75
54
55
+ ### ws.columns
76
56
77
- [ tty.ReadStream#setRawMode ] : #tty_rs_setrawmode_mode
57
+ A ` Number ` that gives the number of columns the TTY currently has. This property
58
+ gets updated on "resize" events.
59
+
60
+ ### ws.rows
61
+
62
+ A ` Number ` that gives the number of rows the TTY currently has. This property
63
+ gets updated on "resize" events.
64
+
65
+ ## tty.isatty(fd)
66
+
67
+ Returns ` true ` or ` false ` depending on if the ` fd ` is associated with a
68
+ terminal.
69
+
70
+ ## tty.setRawMode(mode)
71
+
72
+ Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.
0 commit comments