Certain principles hold for the use of iterators: In general, you should be able to have multiple traversals in progress at the same time; that is, an iterator should allow for the concept of nested ...
Allow multiple consumers of a single async iterator instance. var demuxed= new AsyncIteratorDemuxer(async function*(){ console.log("begin") yield 6 yield 9 return 42 }) async function readAll(iter, fn ...