@@ -315,15 +315,6 @@ const iterKey = '(iteration index)';
315
315
316
316
317
317
const isArray = ( v ) => ArrayIsArray ( v ) || isTypedArray ( v ) || isBuffer ( v ) ;
318
- const inspect = ( v ) => {
319
- const opt = { depth : 0 , maxArrayLength : 3 } ;
320
- if ( v !== null && typeof v === 'object' &&
321
- ! isArray ( v ) && ObjectKeys ( v ) . length > 2 )
322
- opt . depth = - 1 ;
323
- return util . inspect ( v , opt ) ;
324
- } ;
325
-
326
- const getIndexArray = ( length ) => ArrayFrom ( { length } , ( _ , i ) => inspect ( i ) ) ;
327
318
328
319
// https://console.spec.whatwg.org/#table
329
320
Console . prototype . table = function ( tabularData , properties ) {
@@ -336,6 +327,16 @@ Console.prototype.table = function(tabularData, properties) {
336
327
337
328
const final = ( k , v ) => this . log ( cliTable ( k , v ) ) ;
338
329
330
+ const inspect = ( v ) => {
331
+ const opt = { depth : 0 , maxArrayLength : 3 } ;
332
+ if ( v !== null && typeof v === 'object' &&
333
+ ! isArray ( v ) && ObjectKeys ( v ) . length > 2 )
334
+ opt . depth = - 1 ;
335
+ Object . assign ( opt , this [ kGetInspectOptions ] ( this . _stdout ) ) ;
336
+ return util . inspect ( v , opt ) ;
337
+ } ;
338
+ const getIndexArray = ( length ) => ArrayFrom ( { length } , ( _ , i ) => inspect ( i ) ) ;
339
+
339
340
const mapIter = isMapIterator ( tabularData ) ;
340
341
if ( mapIter )
341
342
tabularData = previewMapIterator ( tabularData ) ;
0 commit comments