8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c82d5b commit 63f4eaeCopy full SHA for 63f4eae
lib/internal/util/inspect.js
@@ -1190,6 +1190,8 @@ function groupArrayElements(ctx, output, value) {
1190
if (columns <= 1) {
1191
return output;
1192
}
1193
+ // TODO(BridgeAR): Add unicode support. Use the readline getStringWidth
1194
+ // function.
1195
const tmp = [];
1196
const maxLineLength = [];
1197
for (let i = 0; i < columns; i++) {
@@ -1267,6 +1269,8 @@ function formatBigInt(fn, value) {
1267
1269
function formatPrimitive(fn, value, ctx) {
1268
1270
if (typeof value === 'string') {
1271
if (ctx.compact !== true &&
1272
1273
1274
value.length > kMinLineLength &&
1275
value.length > ctx.breakLength - ctx.indentationLvl - 4) {
1276
return value
@@ -1612,6 +1616,9 @@ function isBelowBreakLength(ctx, output, start, base) {
1612
1616
// Each entry is separated by at least a comma. Thus, we start with a total
1613
1617
// length of at least `output.length`. In addition, some cases have a
1614
1618
// whitespace in-between each other that is added to the total as well.
1619
1620
+ // function. Check the performance overhead and make it an opt-in in case it's
1621
+ // significant.
1615
1622
let totalLength = output.length + start;
1623
if (totalLength + output.length > ctx.breakLength)
1624
return false;