Answer the question
In order to leave comments, you need to log in
What is getReadableStreamSomehow()?
The book has an example:
let fs = require("fs");
let stream = fs.createReadStream("file.txt"); // ~400kb
let readable = getReadableStreamSomehow();
stream.on("data", chunk => {
console.log(`got ${chunk.length} bytes of data`);
stream.pause();
console.log("There will be no more data for 10 second");
setTimeout(() => {
console.log("Now data will start again");
stream.resume();
}, 10000);
})
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