From a2c0aa84e0c1ffc299d8e11eebd8a93688e1f4d3 Mon Sep 17 00:00:00 2001 From: Wyatt Preul Date: Mon, 24 Aug 2015 16:25:51 -0500 Subject: [PATCH] tty: Remove deprecated setRawMode wrapper PR-URL: https://github.com/nodejs/node/pull/2528 Reviewed-By: Brian White Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- doc/api/tty.markdown | 4 ---- lib/tty.js | 10 ---------- 2 files changed, 14 deletions(-) diff --git a/doc/api/tty.markdown b/doc/api/tty.markdown index 279a1dd0b9440e..0b1f55f177397a 100644 --- a/doc/api/tty.markdown +++ b/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 diff --git a/lib/tty.js b/lib/tty.js index c12036e51d014a..7c4f80a4823d32 100644 --- a/lib/tty.js +++ b/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);