Collect all stream chunks into an array
The readable stream to collect
A promise that resolves to an array of all chunks
const result = await toArray(readable);console.log(result); // [1, 2, 3, ...] Copy
const result = await toArray(readable);console.log(result); // [1, 2, 3, ...]
Collect all stream chunks into an array