Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
tty: clarify that tty.setRawMode() has moved to process.stdin
Browse files Browse the repository at this point in the history
Technically saying `tty.ReadStream#setRawMode()` is correct,
but since a typical use cannot instantiate `tty.ReadStream` themselves,
and 99% of the time the only instance is `process.stdin`,
then a little clarification seemed necessary.
  • Loading branch information
TooTallNate committed Mar 29, 2012
1 parent 6aa7550 commit 304f1fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion doc/api/tty.markdown
Expand Up @@ -24,7 +24,8 @@ terminal.

## tty.setRawMode(mode)

Deprecated. Use `tty.ReadStream#setRawMode()` instead.
Deprecated. Use `tty.ReadStream#setRawMode()`
(i.e. `process.stdin.setRawMode()`) instead.


## Class: ReadStream
Expand Down
2 changes: 1 addition & 1 deletion lib/tty.js
Expand Up @@ -37,7 +37,7 @@ exports.setRawMode = function(flag) {
}
process.stdin.setRawMode(flag);
};
module.deprecate('setRawMode', 'Use `tty.ReadStream#setRawMode` instead.');
module.deprecate('setRawMode', 'Use `process.stdin.setRawMode()` instead.');


function ReadStream(fd) {
Expand Down

0 comments on commit 304f1fc

Please sign in to comment.