@@ -114,7 +114,6 @@ const {
114114const {
115115 customInspectSymbol,
116116 isError,
117- join,
118117 removeColors
119118} = require ( 'internal/util' ) ;
120119
@@ -2057,7 +2056,7 @@ function reduceToSingleString(
20572056 const start = output . length + ctx . indentationLvl +
20582057 braces [ 0 ] . length + base . length + 10 ;
20592058 if ( isBelowBreakLength ( ctx , output , start , base ) ) {
2060- const joinedOutput = join ( output , ', ' ) ;
2059+ const joinedOutput = ArrayPrototypeJoin ( output , ', ' ) ;
20612060 if ( ! StringPrototypeIncludes ( joinedOutput , '\n' ) ) {
20622061 return `${ base ? `${ base } ` : '' } ${ braces [ 0 ] } ${ joinedOutput } ` +
20632062 ` ${ braces [ 1 ] } ` ;
@@ -2068,12 +2067,12 @@ function reduceToSingleString(
20682067 // Line up each entry on an individual line.
20692068 const indentation = `\n${ StringPrototypeRepeat ( ' ' , ctx . indentationLvl ) } ` ;
20702069 return `${ base ? `${ base } ` : '' } ${ braces [ 0 ] } ${ indentation } ` +
2071- `${ join ( output , `,${ indentation } ` ) } ${ indentation } ${ braces [ 1 ] } ` ;
2070+ `${ ArrayPrototypeJoin ( output , `,${ indentation } ` ) } ${ indentation } ${ braces [ 1 ] } ` ;
20722071 }
20732072 // Line up all entries on a single line in case the entries do not exceed
20742073 // `breakLength`.
20752074 if ( isBelowBreakLength ( ctx , output , 0 , base ) ) {
2076- return `${ braces [ 0 ] } ${ base ? ` ${ base } ` : '' } ${ join ( output , ', ' ) } ` +
2075+ return `${ braces [ 0 ] } ${ base ? ` ${ base } ` : '' } ${ ArrayPrototypeJoin ( output , ', ' ) } ` +
20772076 braces [ 1 ] ;
20782077 }
20792078 const indentation = StringPrototypeRepeat ( ' ' , ctx . indentationLvl ) ;
@@ -2083,7 +2082,7 @@ function reduceToSingleString(
20832082 const ln = base === '' && braces [ 0 ] . length === 1 ?
20842083 ' ' : `${ base ? ` ${ base } ` : '' } \n${ indentation } ` ;
20852084 // Line up each entry on an individual line.
2086- return `${ braces [ 0 ] } ${ ln } ${ join ( output , `,\n${ indentation } ` ) } ${ braces [ 1 ] } ` ;
2085+ return `${ braces [ 0 ] } ${ ln } ${ ArrayPrototypeJoin ( output , `,\n${ indentation } ` ) } ${ braces [ 1 ] } ` ;
20872086}
20882087
20892088function hasBuiltInToString ( value ) {
0 commit comments