From af2a42423b7cbe05adee419bec5f7d40dd128bdf Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Fri, 31 Jul 2015 00:09:46 -0700 Subject: [PATCH] remove backward compat tty helpers. --- lib/helpers.js | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/lib/helpers.js b/lib/helpers.js index ecc1d6c..6f651ed 100644 --- a/lib/helpers.js +++ b/lib/helpers.js @@ -156,41 +156,3 @@ helpers.__defineGetter__('Element', function() { } return helpers._element; }); - -helpers.isTTY = function(stream) { - if (stream.isTTY) { - return true; - } - if (stream.fd != null) { - return require('tty').isatty(stream.fd); - } - return false; -}; - -helpers.hasRaw = function(stream, value) { - return !!stream.setRawMode - || (stream === process.stdin) - || !!(stream._handle && stream._handle.setRawMode && stream.readable); -}; - -helpers.setRawMode = function(stream, value) { - if (stream.setRawMode) { - return stream.setRawMode(value); - } - if (stream === process.stdin) { - stream._blessedRaw = value; - return require('tty').setRawMode(value); - } - if (stream._handle && stream._handle.setRawMode && stream.readable) { - stream._blessedRaw = value; - return stream._handle.setRawMode(value); - } - throw new Error('Could not set raw mode.'); -}; - -helpers.isRaw = function(stream) { - if (stream.isRaw != null) { - return stream.isRaw; - } - return !!stream._blessedRaw; -};