SyntaxFix
Write A Post
Hire A Developer
Questions
Another solution is passing the read function to the constructor of Readable (cf doc stream readeable options)
var s = new Readable({read(size) { this.push("your string here") this.push(null) }});
you can after use s.pipe for exemple