Answer the question
In order to leave comments, you need to log in
How to organize such a stream?
Hello. There is a code:
let spawn = require('child_process').spawn,
fs = require('fs'),
stream = require('stream').Writable;
let a = new stream();
a._write = (chunk, encoding, done) => {
}
function test () {
this.ls = spawn('Некая команда');
return this.ls.stdin;
}
fs.createReadStream('test.file')
.pipe(test())
.pipe(a);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question