| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -18,29 +18,44 @@ false | |||
| 18 | 18 | ``` | |
| 19 | 19 | ||
| 20 | 20 | ## Class: ReadStream | |
| 21 | + <!-- YAML | ||
| 22 | + added: v0.5.8 | ||
| 23 | + --> | ||
| 21 | 24 | ||
| 22 | 25 | A `net.Socket` subclass that represents the readable portion of a tty. In normal | |
| 23 | 26 | circumstances, `process.stdin` will be the only `tty.ReadStream` instance in any | |
| 24 | 27 | Node.js program (only when `isatty(0)` is true). | |
| 25 | 28 | ||
| 26 | 29 | ### rs.isRaw | |
| 30 | + <!-- YAML | ||
| 31 | + added: v0.7.7 | ||
| 32 | + --> | ||
| 27 | 33 | ||
| 28 | 34 | A `Boolean` that is initialized to `false`. It represents the current "raw" state | |
| 29 | 35 | of the `tty.ReadStream` instance. | |
| 30 | 36 | ||
| 31 | 37 | ### rs.setRawMode(mode) | |
| 38 | + <!-- YAML | ||
| 39 | + added: v0.7.7 | ||
| 40 | + --> | ||
| 32 | 41 | ||
| 33 | 42 | `mode` should be `true` or `false`. This sets the properties of the | |
| 34 | 43 | `tty.ReadStream` to act either as a raw device or default. `isRaw` will be set | |
| 35 | 44 | to the resulting mode. | |
| 36 | 45 | ||
| 37 | 46 | ## Class: WriteStream | |
| 47 | + <!-- YAML | ||
| 48 | + added: v0.5.8 | ||
| 49 | + --> | ||
| 38 | 50 | ||
| 39 | 51 | A `net.Socket` subclass that represents the writable portion of a tty. In normal | |
| 40 | 52 | circumstances, `process.stdout` will be the only `tty.WriteStream` instance | |
| 41 | 53 | ever created (and only when `isatty(1)` is true). | |
| 42 | 54 | ||
| 43 | 55 | ### Event: 'resize' | |
| 56 | + <!-- YAML | ||
| 57 | + added: v0.7.7 | ||
| 58 | + --> | ||
| 44 | 59 | ||
| 45 | 60 | `function () {}` | |
| 46 | 61 | ||
@@ -55,16 +70,25 @@ process.stdout.on('resize', () => { | |||
| 55 | 70 | ``` | |
| 56 | 71 | ||
| 57 | 72 | ### ws.columns | |
| 73 | + <!-- YAML | ||
| 74 | + added: v0.7.7 | ||
| 75 | + --> | ||
| 58 | 76 | ||
| 59 | 77 | A `Number` that gives the number of columns the TTY currently has. This property | |
| 60 | 78 | gets updated on `'resize'` events. | |
| 61 | 79 | ||
| 62 | 80 | ### ws.rows | |
| 81 | + <!-- YAML | ||
| 82 | + added: v0.7.7 | ||
| 83 | + --> | ||
| 63 | 84 | ||
| 64 | 85 | A `Number` that gives the number of rows the TTY currently has. This property | |
| 65 | 86 | gets updated on `'resize'` events. | |
| 66 | 87 | ||
| 67 | 88 | ## tty.isatty(fd) | |
| 89 | + <!-- YAML | ||
| 90 | + added: v0.5.8 | ||
| 91 | + --> | ||
| 68 | 92 | ||
| 69 | 93 | Returns `true` or `false` depending on if the `fd` is associated with a | |
| 70 | 94 | terminal. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments