Skip to content

Commit a2c0aa8

Browse files
geekjasnell
authored andcommitted
tty: Remove deprecated setRawMode wrapper
PR-URL: #2528 Reviewed-By: Brian White <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 4cf19ad commit a2c0aa8

File tree

2 files changed

+0
-14
lines changed

2 files changed

+0
-14
lines changed

doc/api/tty.markdown

-4
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,4 @@ gets updated on "resize" events.
6565
Returns `true` or `false` depending on if the `fd` is associated with a
6666
terminal.
6767

68-
## tty.setRawMode(mode)
69-
70-
Stability: 0 - Deprecated: Use [tty.ReadStream#setRawMode][] (i.e. process.stdin.setRawMode) instead.
71-
7268
[tty.ReadStream#setRawMode]: #tty_rs_setrawmode_mode

lib/tty.js

-10
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,6 @@ exports.isatty = function(fd) {
1414
};
1515

1616

17-
// backwards-compat
18-
exports.setRawMode = internalUtil.deprecate(function(flag) {
19-
if (!process.stdin.isTTY) {
20-
throw new Error('Can\'t set raw mode on non-tty');
21-
}
22-
process.stdin.setRawMode(flag);
23-
}, 'tty.setRawMode is deprecated. ' +
24-
'Use process.stdin.setRawMode instead.');
25-
26-
2717
function ReadStream(fd, options) {
2818
if (!(this instanceof ReadStream))
2919
return new ReadStream(fd, options);

0 commit comments

Comments
 (0)