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