@@ -246,8 +246,8 @@ function configure (options) {
246246 }
247247 const tmp = stringifyFnReplacer ( String ( i ) , value , stack , replacer , spacer , indentation )
248248 res += tmp !== undefined ? tmp : 'null'
249- if ( value . length - 1 > maximumBreadth ) {
250- const removedKeys = value . length - maximumBreadth - 1
249+ if ( value . length > maximumBreadth ) {
250+ const removedKeys = value . length - maximumBreadth
251251 res += `${ join } "... ${ getItemCount ( removedKeys ) } not stringified"`
252252 }
253253 if ( spacer !== '' ) {
@@ -354,10 +354,12 @@ function configure (options) {
354354 }
355355 const tmp = stringifyArrayReplacer ( String ( i ) , value [ i ] , stack , replacer , spacer , indentation )
356356 res += tmp !== undefined ? tmp : 'null'
357- if ( value . length - 1 > maximumBreadth ) {
358- const removedKeys = value . length - maximumBreadth - 1
357+
358+ if ( value . length > maximumBreadth ) {
359+ const removedKeys = value . length - maximumBreadth
359360 res += `${ join } "... ${ getItemCount ( removedKeys ) } not stringified"`
360361 }
362+
361363 if ( spacer !== '' ) {
362364 res += `\n${ originalIndentation } `
363365 }
@@ -444,10 +446,12 @@ function configure (options) {
444446 }
445447 const tmp = stringifyIndent ( String ( i ) , value [ i ] , stack , spacer , indentation )
446448 res += tmp !== undefined ? tmp : 'null'
447- if ( value . length - 1 > maximumBreadth ) {
448- const removedKeys = value . length - maximumBreadth - 1
449+
450+ if ( value . length > maximumBreadth ) {
451+ const removedKeys = value . length - maximumBreadth
449452 res += `${ join } "... ${ getItemCount ( removedKeys ) } not stringified"`
450453 }
454+
451455 res += `\n${ originalIndentation } `
452456 stack . pop ( )
453457 return `[${ res } ]`
@@ -553,8 +557,8 @@ function configure (options) {
553557 }
554558 const tmp = stringifySimple ( String ( i ) , value [ i ] , stack )
555559 res += tmp !== undefined ? tmp : 'null'
556- if ( value . length - 1 > maximumBreadth ) {
557- const removedKeys = value . length - maximumBreadth - 1
560+ if ( value . length > maximumBreadth ) {
561+ const removedKeys = value . length - maximumBreadth
558562 res += `,"... ${ getItemCount ( removedKeys ) } not stringified"`
559563 }
560564 stack . pop ( )
0 commit comments