Skip to content

Commit

Permalink
tty: Remove deprecated setRawMode wrapper
Browse files Browse the repository at this point in the history
PR-URL: #2528
Reviewed-By: Brian White <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
  • Loading branch information
geek authored and jasnell committed Nov 18, 2015
1 parent 4cf19ad commit a2c0aa8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
4 changes: 0 additions & 4 deletions doc/api/tty.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,4 @@ gets updated on "resize" events.
Returns `true` or `false` depending on if the `fd` is associated with a
terminal.

## tty.setRawMode(mode)

Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.

[tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode
10 changes: 0 additions & 10 deletions lib/tty.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,6 @@ exports.isatty = function(fd) {
};


// backwards-compat
exports.setRawMode = internalUtil.deprecate(function(flag) {
if (!process.stdin.isTTY) {
throw new Error('Can\'t set raw mode on non-tty');
}
process.stdin.setRawMode(flag);
}, 'tty.setRawMode is deprecated. ' +
'Use process.stdin.setRawMode instead.');


function ReadStream(fd, options) {
if (!(this instanceof ReadStream))
return new ReadStream(fd, options);
Expand Down

0 comments on commit a2c0aa8

Please sign in to comment.