Skip to content

Commit 63f4eae

Browse files
BridgeARMylesBorins
authored andcommitted
util: add todo comments for inspect to add unicode support
PR-URL: #31112 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent 3c82d5b commit 63f4eae

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎lib/internal/util/inspect.js‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1190,6 +1190,8 @@ function groupArrayElements(ctx, output, value) {
11901190
if(columns<=1){
11911191
returnoutput;
11921192
}
1193+
// TODO(BridgeAR): Add unicode support. Use the readline getStringWidth
1194+
// function.
11931195
consttmp=[];
11941196
constmaxLineLength=[];
11951197
for(leti=0;i<columns;i++){
@@ -1267,6 +1269,8 @@ function formatBigInt(fn, value) {
12671269
functionformatPrimitive(fn,value,ctx){
12681270
if(typeofvalue==='string'){
12691271
if(ctx.compact!==true&&
1272+
// TODO(BridgeAR): Add unicode support. Use the readline getStringWidth
1273+
// function.
12701274
value.length>kMinLineLength&&
12711275
value.length>ctx.breakLength-ctx.indentationLvl-4){
12721276
returnvalue
@@ -1612,6 +1616,9 @@ function isBelowBreakLength(ctx, output, start, base) {
16121616
// Each entry is separated by at least a comma. Thus, we start with a total
16131617
// length of at least `output.length`. In addition, some cases have a
16141618
// whitespace in-between each other that is added to the total as well.
1619+
// TODO(BridgeAR): Add unicode support. Use the readline getStringWidth
1620+
// function. Check the performance overhead and make it an opt-in in case it's
1621+
// significant.
16151622
lettotalLength=output.length+start;
16161623
if(totalLength+output.length>ctx.breakLength)
16171624
returnfalse;

0 commit comments

Comments
 (0)