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

  • k0dard
    k0dard Posts: 93

    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

Categories

Upcoming Training