From 39b9043befe0914824733768f1218f516a21dca7 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Sat, 9 Oct 2010 12:40:15 -0700 Subject: [PATCH] Use readline.columns in sys.inspect when possible Though, this should probably be an option to sys.inspect and be set by REPL. --- lib/sys.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/sys.js b/lib/sys.js index caf383400bb..4da1c057f2d 100644 --- a/lib/sys.js +++ b/lib/sys.js @@ -230,7 +230,7 @@ exports.inspect = function (obj, showHidden, depth, colors) { return prev + cur.length + 1; },0); - if (length > 50) { + if (length > (require('readline').columns || 50)) { output = braces[0] + (base === '' ? '' : base + '\n ') + ' '