0.0.4 • Published 9 years ago

stream-conclusion v0.0.4

Weekly downloads
3
License
MIT
Repository
github
Last release
9 years ago

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);