Browse Source

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 14 years ago
parent
commit
39b9043bef
  1. 2
      lib/sys.js

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

Loading…
Cancel
Save