Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-05-16 09:15:46 +0300
committerJames M Snell <jasnell@gmail.com>2016-05-17 22:31:47 +0300
commitd3f3e183bfdd27a66ce4791ba0c933ab33a91512 (patch)
treedeb0cdb9218e143bfcba3f92a3c40e03545b90d4 /doc/api/tty.md
parent50261929bdfe489384cedf8dfd3f2e8e98b6dbb5 (diff)
doc: add `added:` in for `tty`
Refs: https://github.com/nodejs/node/issues/6578 PR-URL: https://github.com/nodejs/node/pull/6783 Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/tty.md')
-rw-r--r--doc/api/tty.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/api/tty.md b/doc/api/tty.md
index 770990a8dee..e5b3c32f972 100644
--- a/doc/api/tty.md
+++ b/doc/api/tty.md
@@ -18,29 +18,44 @@ false
```
## Class: ReadStream
+<!-- YAML
+added: v0.5.8
+-->
A `net.Socket` subclass that represents the readable portion of a tty. In normal
circumstances, `process.stdin` will be the only `tty.ReadStream` instance in any
Node.js program (only when `isatty(0)` is true).
### rs.isRaw
+<!-- YAML
+added: v0.7.7
+-->
A `Boolean` that is initialized to `false`. It represents the current "raw" state
of the `tty.ReadStream` instance.
### rs.setRawMode(mode)
+<!-- YAML
+added: v0.7.7
+-->
`mode` should be `true` or `false`. This sets the properties of the
`tty.ReadStream` to act either as a raw device or default. `isRaw` will be set
to the resulting mode.
## Class: WriteStream
+<!-- YAML
+added: v0.5.8
+-->
A `net.Socket` subclass that represents the writable portion of a tty. In normal
circumstances, `process.stdout` will be the only `tty.WriteStream` instance
ever created (and only when `isatty(1)` is true).
### Event: 'resize'
+<!-- YAML
+added: v0.7.7
+-->
`function () {}`
@@ -55,16 +70,25 @@ process.stdout.on('resize', () => {
```
### ws.columns
+<!-- YAML
+added: v0.7.7
+-->
A `Number` that gives the number of columns the TTY currently has. This property
gets updated on `'resize'` events.
### ws.rows
+<!-- YAML
+added: v0.7.7
+-->
A `Number` that gives the number of rows the TTY currently has. This property
gets updated on `'resize'` events.
## tty.isatty(fd)
+<!-- YAML
+added: v0.5.8
+-->
Returns `true` or `false` depending on if the `fd` is associated with a
terminal.