import { Readable } from 'stream' ; export const createReadableStreamFromArray = ( array ) => { return new Readable ( { objectMode : true , read ( ) { array . forEach ( ( entry ) => this . push ( entry ) ) ; this . push ( null ) ; } , } ) ; } ;