use streams2 api
- Dominant language
- JavaScript
- Stars
- 3.4k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
make highland a subclass of a [Transform](http://nodejs.org/api/stream.html#stream_class_stream_transform_1) stream, using the [readable stream](https://github.com/isaacs/readable-stream) module. When called with generators they could be called as the _transform and _flush functions, array could be a shortcut for
``` javascript
xs.forEach(function(item){
this.write(item);
},this);
this.end();
```
with Stream.prototype._transform defaulting to
``` javascript
Stream.prototype._transform = function(chunk, _, next) {
this.push(chunk);
next();
};
```
This will allow much of the queuing and back pressure logic to be removed, but some of the redirection logic will still need to get implemented.
Contributor guide
Research direction
Start with the Node.js Transform stream and readable-stream links in the issue, then inspect Highland's existing queuing and redirection logic. Done means Highland uses the Transform API, supports generator-based _transform and _flush functions, provides the array shortcut and passthrough default, and retains the required redirection behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- backend, stream-processing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100