@@ -99,29 +99,46 @@ process.stdout.on('resize', () => {
99
99
});
100
100
```
101
101
102
- ### writeStream.columns
102
+ ### writeStream.clearLine(dir)
103
103
<!-- YAML
104
104
added: v0.7.7
105
105
-->
106
106
107
- A ` number ` specifying the number of columns the TTY currently has. This property
108
- is updated whenever the ` 'resize' ` event is emitted.
107
+ * ` dir ` {number}
108
+ * ` -1 ` - to the left from cursor
109
+ * ` 1 ` - to the right from cursor
110
+ * ` 0 ` - the entire line
109
111
110
- ### writeStream.isTTY
112
+ ` writeStream.clearLine() ` clears the current line of this ` WriteStream ` in a
113
+ direction identified by ` dir ` .
114
+
115
+ ### writeStream.clearScreenDown()
111
116
<!-- YAML
112
- added: v0.5.8
117
+ added: v0.7.7
113
118
-->
114
119
115
- A ` boolean ` that is always ` true ` .
120
+ ` writeStream.clearScreenDown() ` clears this ` WriteStream ` from the current
121
+ cursor down.
116
122
117
- ### writeStream.rows
123
+ ### writeStream.columns
118
124
<!-- YAML
119
125
added: v0.7.7
120
126
-->
121
127
122
- A ` number ` specifying the number of rows the TTY currently has. This property
128
+ A ` number ` specifying the number of columns the TTY currently has. This property
123
129
is updated whenever the ` 'resize' ` event is emitted.
124
130
131
+ ### writeStream.cursorTo(x, y)
132
+ <!-- YAML
133
+ added: v0.7.7
134
+ -->
135
+
136
+ * ` x ` {number}
137
+ * ` y ` {number}
138
+
139
+ ` writeStream.cursorTo() ` moves this ` WriteStream ` 's cursor to the specified
140
+ position.
141
+
125
142
### writeStream.getColorDepth([ env] )
126
143
<!-- YAML
127
144
added: v9.9.0
@@ -148,6 +165,43 @@ to pass in an object with different settings.
148
165
Use the ` NODE_DISABLE_COLORS ` environment variable to enforce this function to
149
166
always return 1.
150
167
168
+ ### writeStream.getWindowSize()
169
+ <!-- YAML
170
+ added: v0.7.7
171
+ -->
172
+ * Returns: {number[ ] }
173
+
174
+ ` writeStream.getWindowSize() ` returns the size of the [ TTY] ( tty.html )
175
+ corresponding to this ` WriteStream ` . The array is of the type
176
+ ` [numColumns, numRows] ` where ` numColumns ` and ` numRows ` represent the number
177
+ of columns and rows in the corresponding [ TTY] ( tty.html ) .
178
+
179
+ ### writeStream.isTTY
180
+ <!-- YAML
181
+ added: v0.5.8
182
+ -->
183
+
184
+ A ` boolean ` that is always ` true ` .
185
+
186
+ ### writeStream.moveCursor(dx, dy)
187
+ <!-- YAML
188
+ added: v0.7.7
189
+ -->
190
+
191
+ * ` dx ` {number}
192
+ * ` dy ` {number}
193
+
194
+ ` writeStream.moveCursor() ` moves this ` WriteStream ` 's cursor * relative* to its
195
+ current position.
196
+
197
+ ### writeStream.rows
198
+ <!-- YAML
199
+ added: v0.7.7
200
+ -->
201
+
202
+ A ` number ` specifying the number of rows the TTY currently has. This property
203
+ is updated whenever the ` 'resize' ` event is emitted.
204
+
151
205
## tty.isatty(fd)
152
206
<!-- YAML
153
207
added: v0.5.8
0 commit comments