let transform = new stream.Transform({
transform(chunk, encoding, cb) {
this.push(chunk.toString())
}
});
fs
.createReadStream('./src/index.html')
.pipe(transform);
// transform.write('wefwef')
console.log(transform.read().toString())
transform.read() 返回的是null是为什么
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…