Methods
height() → {number}
- Source:
Returns:
-
the current height, i.e the number of columns or if unknown
-
- Type
- number
resizehandler(handler) → {Tty}
Set a resize handler, the handler is called when the tty size changes.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the resize handler |
- Source:
Returns:
this object
- Type
- Tty
stdinHandler(handler) → {Tty}
Set a stream handler on the standard input to read the data.
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | the standard input |
- Source:
Returns:
this object
- Type
- Tty
type() → {string}
- Source:
Returns:
-
the declared tty type, for instance , , etc... it can be null when the tty does not have declared its type.
-
- Type
- string
width() → {number}
- Source:
Returns:
-
the current width, i.e the number of rows or if unknown
-
- Type
- number
write(data) → {Tty}
Write data to the standard output.
Parameters:
Name | Type | Description |
---|---|---|
data |
string | the data to write |
- Source:
Returns:
this object
- Type
- Tty