export default class TableBatchUtils { static param { ( NodeJS . ReadableStream | undefined ) } stream return { * } memberof public static async StreamToString ( stream ) { if ( stream === undefined ) { throw new Error ( "undefined stream passed to function!" ) ; } const chunks = [ ] ; return new Promise ( ( resolve , reject ) => { stream . on ( "data" , ( chunk ) => chunks . push ( chunk ) ) ; stream . on ( "error" , reject ) ; stream . on ( "end" , ( ) => resolve ( Buffer . concat ( chunks ) . toString ( "utf8" ) ) ) ; } ) ; } }