juliangruber / juliangruber/async-stream

add co-queue example

Open
#5 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
133
Forks
1
PR merge metrics
No merged PRs in 30d

Description

for working with pushing sources.

``` js
function wrap(emitter, event){
var queue = new Queue;
emitter.on(event, queue.push);
return function*(end){
if (!end) return yield queue.next;
};
}

var read = wrap(emitter, 'data');
while (true) console.log(yield read());
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the repository's existing examples and documentation to find where stream usage examples belong, then compare the requested co-queue snippet with those conventions. Done means the pushing-sources example is added in the appropriate location and clearly demonstrates the shown emitter, queue, and reader flow.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.