Welcome to the Linux Foundation Forum!

pipe() Readable stream to process.stdout, with objectMode: true

Options

Hi
i have Readable stream like so :
function createReadStream(data){ return new Readable({ objectMode: true, read(){ if(index>data.length){ this.push(null) } else{ this.push(data[index]) index++ } } }) }

Comments

  • k0dard
    k0dard Posts: 115
    Options

    Hello theodoros,

    I think it would be helpful if you could format your code in a way that it is more readable for others.

    Also, what exactly is your question? :smile:

  • davidmarkclements
    Options

    yeah this needs more info to answer

Categories

Upcoming Training