Welcome to the Linux Foundation Forum!

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

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

  • Posts: 115

    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:

  • yeah this needs more info to answer

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Welcome!

It looks like you're new here. Sign in or register to get started.
Sign In

Categories

Upcoming Training