Test that two readable streams are equal to each other.
npm install stream-equalTest that two readable streams are equal to each other.


``js
const streamEqual = require('stream-equal');
const fs = require('fs');
let readStream1 = fs.createReadStream(file);
let readStream2 = fs.createReadStream(file);
let equal = await streamEqual(readStream1, readStream2);
`
You could also get the hash sum of a stream to test it against another stream. But that would take up more CPU due to the hashing and would require a bit more data to be read if they are not equal.
A function that compares each data event on both streams, pausing when needed to keep them in sync. Returns a proimse that resolves to either true or false.
npm install stream-equal
`bash``
npm test