Use readline.columns in sys.inspect when possible

Though, this should probably be an option to sys.inspect and be set by REPL.
v0.7.4-release
Ryan Dahl 2010-10-09 12:40:15 -07:00
parent d164989e3f
commit 39b9043bef
1 changed files with 1 additions and 1 deletions

View File

@ -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 ')
+ ' '