mirror of https://gitee.com/bigwinds/arangodb
limit string on output
This commit is contained in:
parent
741e42230a
commit
5aa74e9822
|
@ -925,6 +925,7 @@
|
|||
var useColor = context.useColor;
|
||||
var customInspect = context.customInspect;
|
||||
var useToString = context.useToString;
|
||||
var limitString = context.limitString;
|
||||
|
||||
if (typeof context.seen === "undefined") {
|
||||
context.seen = [];
|
||||
|
@ -1019,6 +1020,12 @@
|
|||
context.output += colors.COLOR_STRING;
|
||||
}
|
||||
|
||||
if (limitString) {
|
||||
if (limitString < value.length) {
|
||||
value = value.substr(0, limitString) + "...";
|
||||
}
|
||||
}
|
||||
|
||||
context.output += quoteJsonString(value);
|
||||
|
||||
if (useColor) {
|
||||
|
@ -1134,6 +1141,7 @@
|
|||
prettyPrint: usePrettyPrint,
|
||||
useColor: useColor,
|
||||
customInspect: true,
|
||||
limitString: 80,
|
||||
useToString: true
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue