I\'m hacking on a Node program that uses smtp-protocol to capture SMTP emails and act on the mail data. The library provides the mail data as a stream, and I don\'t know how
What do you think about this ?
// lets a ReadableStream under stream variable const chunks = []; for await (let chunk of stream) { chunks.push(chunk) } const buffer = Buffer.concat(chunks); const str = buffer.toString("utf-8")