Reading through the Readable.from code is seems to me that the semantics of using Readable.from on a generator which yields null is not entirely clear.
Should we add a check for value == null and throw?
asyncfunctionnext(){try{const{ value, done }=awaititerator.next();if(done){readable.push(null);}elseif(readable.push(awaitvalue)){// Hm, push(null) and then next()?next();}else{reading=false;}}catch(err){readable.destroy(err);}}Might also want to be a bit more explicit in the docs about this?
Reading through the
Readable.fromcode is seems to me that the semantics of usingReadable.fromon a generator which yields null is not entirely clear.Should we add a check for
value == nulland throw?Might also want to be a bit more explicit in the docs about this?