stream-conclusion
v0.0.4
Published
Analyses the contents of a stream and returns the number of chunks and amount of bytes passed
Maintainers
Readme
stream-conclusion
Analyses streams to summarize the number of chunks and bytes passed
The given callback will be called when the stream ends, and provides an argument with the properties chunks and bytes.
Example:
var streamConclusion = require('stream-conclusion');
function conclusion(result) {
console.log(result.bytes + " bytes passed through in " + result.chunks + " chunks");
}
inStream.pipe(streamConclusion(conclusion)).pipe(outStream);