Browse Source

tty: Remove deprecated setRawMode wrapper

PR-URL: https://github.com/nodejs/node/pull/2528
Reviewed-By: Brian White <mscdex@mscdex.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
process-exit-stdio-flushing
Wyatt Preul 9 years ago
committed by James M Snell
parent
commit
a2c0aa84e0
  1. 4
      doc/api/tty.markdown
  2. 10
      lib/tty.js

4
doc/api/tty.markdown

@ -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
lib/tty.js

@ -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);

Loading…
Cancel
Save