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 useColor = context.useColor;
|
||||||
var customInspect = context.customInspect;
|
var customInspect = context.customInspect;
|
||||||
var useToString = context.useToString;
|
var useToString = context.useToString;
|
||||||
|
var limitString = context.limitString;
|
||||||
|
|
||||||
if (typeof context.seen === "undefined") {
|
if (typeof context.seen === "undefined") {
|
||||||
context.seen = [];
|
context.seen = [];
|
||||||
|
@ -1019,6 +1020,12 @@
|
||||||
context.output += colors.COLOR_STRING;
|
context.output += colors.COLOR_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (limitString) {
|
||||||
|
if (limitString < value.length) {
|
||||||
|
value = value.substr(0, limitString) + "...";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
context.output += quoteJsonString(value);
|
context.output += quoteJsonString(value);
|
||||||
|
|
||||||
if (useColor) {
|
if (useColor) {
|
||||||
|
@ -1134,6 +1141,7 @@
|
||||||
prettyPrint: usePrettyPrint,
|
prettyPrint: usePrettyPrint,
|
||||||
useColor: useColor,
|
useColor: useColor,
|
||||||
customInspect: true,
|
customInspect: true,
|
||||||
|
limitString: 80,
|
||||||
useToString: true
|
useToString: true
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue