File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -296,15 +296,15 @@ export class TableToStringIterator implements IterableIterator<string> {
296
296
pipe ( stream : NodeJS . WritableStream ) {
297
297
let res : IteratorResult < string > ;
298
298
let write = ( ) => {
299
- if ( stream . writable ) {
299
+ if ( stream [ ' writable' ] ) {
300
300
do {
301
301
if ( ( res = this . next ( ) ) . done ) { break ; }
302
- } while ( stream . write ( res . value + '\n' , 'utf8' ) ) ;
302
+ } while ( stream [ ' write' ] ( res . value + '\n' , 'utf8' ) ) ;
303
303
}
304
304
if ( ! res || ! res . done ) {
305
- stream . once ( 'drain' , write ) ;
306
- } else if ( ! ( stream as any ) . isTTY ) {
307
- stream . end ( '\n' ) ;
305
+ stream [ ' once' ] ( 'drain' , write ) ;
306
+ } else if ( ! ( stream as any ) [ ' isTTY' ] ) {
307
+ stream [ ' end' ] ( '\n' ) ;
308
308
}
309
309
} ;
310
310
write ( ) ;
@@ -324,7 +324,7 @@ function* tableRowsToString(table: Table, separator = ' | ') {
324
324
}
325
325
}
326
326
yield header . map ( ( x , j ) => leftPad ( x , ' ' , maxColumnWidths [ j ] ) ) . join ( separator ) ;
327
- for ( let i = - 1 , n = table . length ; ++ i < n ; ) {
327
+ for ( let i = - 1 ; ++ i < table . length ; ) {
328
328
yield [ i , ...table . get ( i ) ]
329
329
. map ( ( x ) => stringify ( x ) )
330
330
. map ( ( x , j ) => leftPad ( x , ' ' , maxColumnWidths [ j ] ) )
You can’t perform that action at this time.
0 commit comments