Browse Source

doc: sort tty alphabetically

Reorders, with no contextual changes, the tty documentation
alphabetically.

PR-URL: https://github.com/nodejs/node/pull/3662
Reviewed-By: Evan Lucas <evanlucas@me.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
process-exit-stdio-flushing
Tristian Flanagan 9 years ago
committed by James M Snell
parent
commit
e4009b6341
  1. 41
      doc/api/tty.markdown

41
doc/api/tty.markdown

@ -15,18 +15,6 @@ in a TTY context is to check `process.stdout.isTTY`:
$ node -p -e "Boolean(process.stdout.isTTY)" | cat
false
## tty.isatty(fd)
Returns `true` or `false` depending on if the `fd` is associated with a
terminal.
## tty.setRawMode(mode)
Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.
## Class: ReadStream
A `net.Socket` subclass that represents the readable portion of a tty. In normal
@ -44,6 +32,7 @@ of the `tty.ReadStream` instance.
`tty.ReadStream` to act either as a raw device or default. `isRaw` will be set
to the resulting mode.
[tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode
## Class: WriteStream
@ -51,16 +40,6 @@ 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).
### ws.columns
A `Number` that gives the number of columns the TTY currently has. This property
gets updated on "resize" events.
### ws.rows
A `Number` that gives the number of rows the TTY currently has. This property
gets updated on "resize" events.
### Event: 'resize'
`function () {}`
@ -73,5 +52,21 @@ has changed.
console.log(process.stdout.columns + 'x' + process.stdout.rows);
});
### ws.columns
[tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode
A `Number` that gives the number of columns the TTY currently has. This property
gets updated on "resize" events.
### ws.rows
A `Number` that gives the number of rows the TTY currently has. This property
gets updated on "resize" events.
## tty.isatty(fd)
Returns `true` or `false` depending on if the `fd` is associated with a
terminal.
## tty.setRawMode(mode)
Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.

Loading…
Cancel
Save