Idiomatic representation of { buffer, bytesRead }

Kevin Smith zenparsing at gmail.com
Thu Mar 5 23:50:15 UTC 2015


>
>
> Wouldn't `.next()` rather need to return an IteratorResult<Promise<
> DataView>>?


No, because the "done-ness" of the iteration is itself asynchronous.  You
don't know whether you're done iterating until the promise resolves.

https://github.com/zenparsing/async-iteration/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150305/02b9a519/attachment.html>


More information about the es-discuss mailing list