Using the catch
option will resolve whatever it
has consumed before the error is thrown and return an object
containing the result and the error.
CATCH
--1--2--3--E--4--5--6--|
toArray(stream, { catch: true })
{ result: [1, 2, 3], error: E }
Consumes all chunks in the stream and resolves them as an array.
Optional
options: ToArrayOptionsGenerated using TypeDoc
Consumes all chunks in the stream and resolves them as an array.