I can write to stream which is ended.
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
Should I be able to write to the stream which has ended?
If I do:
```
var one = H([1, 2, 3]);
one.consume(function (err, x, push, next) {
if (x === H.nil) {
console.log('Nil')
} else {
console.log(x);
}
next();
}).each(H.log);
one.write(4); //throw expected here, but it does not happen.
//Output is: [1, 2, 3, Nil, 4]
```
Contributor guide
Research direction
Start by running the reproduction using H([1, 2, 3]), consume, and write(4), and observe the output after H.nil. Trace the stream lifecycle around consume, the ended state, and write to determine the intended behavior. Done means the behavior of writing after the stream ends is defined and covered by an appropriate test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100