Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

tty: clarify that tty.setRawMode() has moved to process.stdin

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...
commit 304f1fcf86f38552d483eb69f6ccef331e691753 1 parent 6aa7550
@TooTallNate authored
Showing with 3 additions and 2 deletions.
  1. +2 −1  doc/api/tty.markdown
  2. +1 −1  lib/tty.js
View
3  doc/api/tty.markdown
@@ -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
View
2  lib/tty.js
@@ -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) {

2 comments on commit 304f1fc

@isaacs

lgtm.

@bitcrazed

Perfect! Thanks for clarifying - the 'i.e.' tells me what I need to do to move forward :) The less arcania the user is expected to understand, the easier they'll find it ;)

Please sign in to comment.
Something went wrong with that request. Please try again.