{"_id":"checksum-stream","_rev":"84034","name":"checksum-stream","description":"Calculates and/or checks data coming through a stream and emits the digest before stream end.","dist-tags":{"latest":"1.0.3"},"maintainers":[{"name":"zkat","email":"kat@sykosomatic.org"}],"time":{"modified":"2021-06-03T10:26:44.000Z","created":"2017-02-20T01:44:07.546Z","1.0.3":"2017-02-21T20:15:14.625Z","1.0.2":"2017-02-20T02:06:05.514Z","1.0.1":"2017-02-20T01:52:42.083Z","1.0.0":"2017-02-20T01:44:07.546Z"},"users":{},"author":{"name":"Kat Marchán","email":"kzm@sykosomatic.org"},"repository":{"type":"git","url":"git+https://github.com/zkat/checksum-stream.git"},"versions":{"1.0.3":{"name":"checksum-stream","version":"1.0.3","description":"Calculates and/or checks data coming through a stream and emits the digest before stream end.","main":"index.js","files":["*.md","*.js"],"scripts":{"preversion":"npm t","postversion":"npm publish && git push --follow-tags","pretest":"standard lib test *.js","test":"nyc -- tap test/*.js","update-coc":"weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'","update-contrib":"weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"},"repository":{"type":"git","url":"git+https://github.com/zkat/checksum-stream.git"},"keywords":["streams","checksum","sha1"],"author":{"name":"Kat Marchán","email":"kzm@sykosomatic.org"},"license":"CC0-1.0","dependencies":{},"devDependencies":{"nyc":"^10.0.0","standard":"^8.6.0","tap":"^8.0.1","weallbehave":"^1.0.3","weallcontribute":"^1.0.7"},"gitHead":"68bc9dcfdbceb0cbb01d4ea8693b2713a5ec8767","bugs":{"url":"https://github.com/zkat/checksum-stream/issues"},"homepage":"https://github.com/zkat/checksum-stream#readme","_id":"checksum-stream@1.0.3","_shasum":"4e17e6f83c80f7a9f43e83b445a81454c38a0172","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.4.0","_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"dist":{"shasum":"4e17e6f83c80f7a9f43e83b445a81454c38a0172","size":13139,"noattachment":false,"key":"/checksum-stream/-/checksum-stream-1.0.3.tgz","tarball":"http://registry.cnpm.dingdandao.com/checksum-stream/download/checksum-stream-1.0.3.tgz"},"maintainers":[{"name":"zkat","email":"kat@sykosomatic.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/checksum-stream-1.0.3.tgz_1487708112639_0.24931034399196506"},"directories":{},"publish_time":1487708114625,"_cnpm_publish_time":1487708114625,"_hasShrinkwrap":false},"1.0.2":{"name":"checksum-stream","version":"1.0.2","description":"Calculates and/or checks data coming through a stream and emits the digest before stream end.","main":"index.js","files":["*.md","*.js"],"scripts":{"preversion":"npm t","postversion":"npm publish && git push --follow-tags","pretest":"standard lib test *.js","test":"nyc -- tap test/*.js","update-coc":"weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'","update-contrib":"weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"},"repository":{"type":"git","url":"git+https://github.com/zkat/checksum-stream.git"},"keywords":["streams","checksum","sha1"],"author":{"name":"Kat Marchán","email":"kzm@sykosomatic.org"},"license":"CC0-1.0","dependencies":{},"devDependencies":{"nyc":"^10.0.0","standard":"^8.6.0","tap":"^8.0.1","weallbehave":"^1.0.3","weallcontribute":"^1.0.7"},"gitHead":"d308a2b1df673bf678843d49b63bc27e40ee70f3","bugs":{"url":"https://github.com/zkat/checksum-stream/issues"},"homepage":"https://github.com/zkat/checksum-stream#readme","_id":"checksum-stream@1.0.2","_shasum":"f31e51e22c24d427fdc4fbb18118d7a45a40069a","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.4.0","_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"dist":{"shasum":"f31e51e22c24d427fdc4fbb18118d7a45a40069a","size":13136,"noattachment":false,"key":"/checksum-stream/-/checksum-stream-1.0.2.tgz","tarball":"http://registry.cnpm.dingdandao.com/checksum-stream/download/checksum-stream-1.0.2.tgz"},"maintainers":[{"name":"zkat","email":"kat@sykosomatic.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/checksum-stream-1.0.2.tgz_1487556365285_0.8213950721547008"},"directories":{},"publish_time":1487556365514,"_cnpm_publish_time":1487556365514,"_hasShrinkwrap":false},"1.0.1":{"name":"checksum-stream","version":"1.0.1","description":"Calculates and/or checks data coming through a stream and emits the digest before stream end.","main":"index.js","files":["*.md","*.js"],"scripts":{"preversion":"npm t","postversion":"npm publish && git push --follow-tags","pretest":"standard lib test *.js","test":"nyc -- tap test/*.js","update-coc":"weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'","update-contrib":"weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"},"repository":{"type":"git","url":"git+https://github.com/zkat/checksum-stream.git"},"keywords":["streams","checksum","sha1"],"author":{"name":"Kat Marchán","email":"kzm@sykosomatic.org"},"license":"CC0-1.0","dependencies":{},"devDependencies":{"nyc":"^10.0.0","standard":"^8.6.0","tap":"^8.0.1","weallbehave":"^1.0.3","weallcontribute":"^1.0.7"},"gitHead":"1bf19acace60f3e653fdfc54a9072aec85f292aa","bugs":{"url":"https://github.com/zkat/checksum-stream/issues"},"homepage":"https://github.com/zkat/checksum-stream#readme","_id":"checksum-stream@1.0.1","_shasum":"d02506d04ce8cbf6b7b1ee610b27f8d5b1ae15d2","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.4.0","_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"dist":{"shasum":"d02506d04ce8cbf6b7b1ee610b27f8d5b1ae15d2","size":13297,"noattachment":false,"key":"/checksum-stream/-/checksum-stream-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/checksum-stream/download/checksum-stream-1.0.1.tgz"},"maintainers":[{"name":"zkat","email":"kat@sykosomatic.org"}],"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/checksum-stream-1.0.1.tgz_1487555560276_0.3562952105421573"},"directories":{},"publish_time":1487555562083,"_cnpm_publish_time":1487555562083,"_hasShrinkwrap":false},"1.0.0":{"name":"checksum-stream","version":"1.0.0","description":"Calculates and/or checks data coming through a stream and emits the digest before stream end.","main":"index.js","files":["*.md","*.js"],"scripts":{"preversion":"npm t","postversion":"npm publish && git push --follow-tags","pretest":"standard lib test *.js","test":"nyc -- tap test/*.js","update-coc":"weallbehave -o . && git add CODE_OF_CONDUCT.md && git commit -m 'docs(coc): updated CODE_OF_CONDUCT.md'","update-contrib":"weallcontribute -o . && git add CONTRIBUTING.md && git commit -m 'docs(contributing): updated CONTRIBUTING.md'"},"repository":{"type":"git","url":"git+https://github.com/zkat/checksum-stream.git"},"keywords":["streams","checksum","sha1"],"author":{"name":"Kat Marchán","email":"kzm@sykosomatic.org"},"license":"CC0-1.0","dependencies":{},"devDependencies":{"nyc":"^10.0.0","standard":"^8.6.0","tap":"^8.0.1","weallbehave":"^1.0.3","weallcontribute":"^1.0.7"},"gitHead":"615a6b701aa0ed5dc326c87ff5b09e419ef469a1","bugs":{"url":"https://github.com/zkat/checksum-stream/issues"},"homepage":"https://github.com/zkat/checksum-stream#readme","_id":"checksum-stream@1.0.0","_shasum":"13ba220fa054064888989f5e2e1ce52ccd0b09dc","_from":".","_npmVersion":"4.3.0","_nodeVersion":"7.4.0","_npmUser":{"name":"zkat","email":"kat@sykosomatic.org"},"dist":{"shasum":"13ba220fa054064888989f5e2e1ce52ccd0b09dc","size":13310,"noattachment":false,"key":"/checksum-stream/-/checksum-stream-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/checksum-stream/download/checksum-stream-1.0.0.tgz"},"maintainers":[{"name":"zkat","email":"kat@sykosomatic.org"}],"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/checksum-stream-1.0.0.tgz_1487555047333_0.017245544819161296"},"directories":{},"publish_time":1487555047546,"_cnpm_publish_time":1487555047546,"_hasShrinkwrap":false}},"readme":"# checksum-stream [![npm version](https://img.shields.io/npm/v/checksum-stream.svg)](https://npm.im/checksum-stream) [![license](https://img.shields.io/npm/l/checksum-stream.svg)](https://npm.im/checksum-stream) [![Travis](https://img.shields.io/travis/zkat/checksum-stream.svg)](https://travis-ci.org/zkat/checksum-stream) [![AppVeyor](https://ci.appveyor.com/api/projects/status/github/zkat/checksum-stream?svg=true)](https://ci.appveyor.com/project/zkat/checksum-stream) [![Coverage Status](https://coveralls.io/repos/github/zkat/checksum-stream/badge.svg?branch=latest)](https://coveralls.io/github/zkat/checksum-stream?branch=latest)\n\n[`checksum-stream`](https://npm.im/checksum-stream) is a passthrough stream that calculates the digest and size for data piped through it. Before closing, it will emit `digest` and `size` events with the final stream size.\n\nIt can also be configured to error if `digest` or `size` do not matched a passed-in value that is expected for either or both. `size` errors will always be emitted first.\n\n## Install\n\n`$ npm install --save checksum-stream`\n\n## Example\n\n### npm repo\n```javascript\nconst checksumStream = require('checksum-stream')\nconst fs = require('fs')\nconst request = require('request')\n\nlet req = request.get('https://npm.im/checksum-stream')\nreq.on('response', function (res) {\n  res.pipe(\n    checksumStream({\n      algorithm: 'sha256',\n      digest: res.headers['etag'],\n      size: res.headers['content-length']\n    }).on('error', e => throw e)\n  ).pipe(\n    fs.createWriteStream('./checksum-stream.html')\n  )\n})\n```\n","_attachments":{},"homepage":"https://github.com/zkat/checksum-stream#readme","bugs":{"url":"https://github.com/zkat/checksum-stream/issues"},"license":"CC0-1.0"}