https://github.com/grantila/stream-conclusion
Analyses streams to summarize the number of chunks and bytes passed
https://github.com/grantila/stream-conclusion
Last synced: 8 months ago
JSON representation
Analyses streams to summarize the number of chunks and bytes passed
- Host: GitHub
- URL: https://github.com/grantila/stream-conclusion
- Owner: grantila
- License: mit
- Created: 2015-05-11T11:33:02.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-10-21T12:15:35.000Z (almost 10 years ago)
- Last Synced: 2024-12-17T01:34:25.480Z (10 months ago)
- Language: JavaScript
- Size: 148 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# stream-conclusion
Analyses streams to summarize the number of chunks and bytes passedThe given callback will be called when the stream ends, and provides an argument with the properties `chunks` and `bytes`.
Example:
```js
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);
```