Methods
read() → {Promise.<(Uint8Array|string)>}
Returns a promise which is fulfilled when stdin can return a chunk.
Returns:
- Type:
-
Promise.<(Uint8Array|string)>
The chunk read from stdin.
setEncoding(encodingopt)
Sets the encoding for the TTY read stream.
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
encoding |
String
|
<optional> |
utf-8 |
The character encoding to use. |