import { Readable } from 'stream' ; export const createStreamFromBuffer = ( buffer ) : Readable => { const stream = new Readable ( ) ; stream . push ( buffer ) ; stream . push ( null ) ; return stream ; } ;