mirror of https://github.com/nodejs/node.git
Use readline.columns in sys.inspect when possible
Though, this should probably be an option to sys.inspect and be set by REPL.pull/22966/head
parent
d164989e3f
commit
39b9043bef
|
@ -230,7 +230,7 @@ exports.inspect = function (obj, showHidden, depth, colors) {
|
||||||
return prev + cur.length + 1;
|
return prev + cur.length + 1;
|
||||||
},0);
|
},0);
|
||||||
|
|
||||||
if (length > 50) {
|
if (length > (require('readline').columns || 50)) {
|
||||||
output = braces[0]
|
output = braces[0]
|
||||||
+ (base === '' ? '' : base + '\n ')
|
+ (base === '' ? '' : base + '\n ')
|
||||||
+ ' '
|
+ ' '
|
||||||
|
|
Loading…
Reference in New Issue