t-readable
Split one readable stream into multiple readable streams.
Installation
Using npm:
npm install t-readable
or yarn:
yan add t-readable
Usage
const tee = ;const got = ; const url = 'https://upload.wikimedia.org/wikipedia/en/a/a9/Example.jpg'; /** * Counts the number of bytes in the givent stream * @param readable * @return */ { let bytesRead = 0; return { readable; readable; readable; };} async { const stream = got; // stream is an instance of class stream.Readable const teedStreams = ; // Count the number of bytes received in each teed stream const counts = await PromiseallteedStreams; console; // Counts: 27661, 27661};