I am not an expert on streams but I do believe that it should be possible to open a stream and read from it later (for instance an async function could return the stream wrapped in a promise).
Unfortunately it cannot work with this module because the readable event may have already been emitted. IMHO the best way to achieve what you want is by using the stream in flow mode.
I am not an expert on streams but I do believe that it should be possible to open a stream and read from it later (for instance an async function could return the stream wrapped in a promise).
Unfortunately it cannot work with this module because the
readable
event may have already been emitted. IMHO the best way to achieve what you want is by using the stream in flow mode.