-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
Version
v19.7.0
Platform
No response
Subsystem
No response
What steps will reproduce the bug?
const stream = require("stream");
const s = stream.compose(
stream.Readable.from("0 1 2 3 4"),
new stream.Transform({
readableObjectMode: true,
transform: function (val, enc, callback) {
for (const num of val.toString().split(" ")) {
this.push(`${num}`);
}
callback();
},
})
);
s.on("readable", () => {
let data;
while ((data = s.read()) !== null) {
console.log("read:", `${data}`);
}
});
s.on("end", () => {
console.log("done");
});
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
Should output
read: 0
read: 1
read: 2
read: 3
read: 4
done
What do you see instead?
read: 01234
read: null
done
Additional information
No response
Metadata
Metadata
Assignees
Labels
streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.