Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tty: Remove deprecated setRawMode wrapper #2528

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions doc/api/tty.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@ 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.


## Class: ReadStream

A `net.Socket` subclass that represents the readable portion of a tty. In normal
Expand Down
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