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> {
296296 pipe ( stream : NodeJS . WritableStream ) {
297297 let res : IteratorResult < string > ;
298298 let write = ( ) => {
299- if ( stream . writable ) {
299+ if ( stream [ ' writable' ] ) {
300300 do {
301301 if ( ( res = this . next ( ) ) . done ) { break ; }
302- } while ( stream . write ( res . value + '\n' , 'utf8' ) ) ;
302+ } while ( stream [ ' write' ] ( res . value + '\n' , 'utf8' ) ) ;
303303 }
304304 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' ) ;
308308 }
309309 } ;
310310 write ( ) ;
@@ -324,7 +324,7 @@ function* tableRowsToString(table: Table, separator = ' | ') {
324324 }
325325 }
326326 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 ; ) {
328328 yield [ i , ...table . get ( i ) ]
329329 . map ( ( x ) => stringify ( x ) )
330330 . map ( ( x , j ) => leftPad ( x , ' ' , maxColumnWidths [ j ] ) )
You can’t perform that action at this time.
0 commit comments