bustle / bluestream

A collection of streams that work well with promises (through, map, reduce). Think Through2 with promises
MIT License
103 stars 5 forks source link

shift / pop / next function could make iteration on node 8 easier #41

Closed xloem closed 4 years ago

xloem commented 4 years ago

I don't think node 8 did async iteration yet, despite supporting the object structures with streams, and it's still included with ubuntu 18 LTS.

So, something like this might be nice:

while (data = await bluestream.next(stream)) {
  ...
}
xloem commented 4 years ago

oh! I see that would be readAsync(1). Sorry =)