{"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","tarball":"http://registry-npm.ywwl.com/checksum-stream/download/checksum-stream-1.0.3.tgz","integrity":"sha512-OUI+PL6ksDK1ZXdpgv+xFO59rfTjFUl3KhTXqvR5gNYiuYUpGBuU0NMc5cR4uGmzJ4i3NMNowgClBfrUpTFoGg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDHfIu9mIgkRLrc5328m7yPEbZmJNTBcE50UOoPwdN8UAiEAqTKffJNm4dpFH+WiwygLoujbzIZvbQ+2MVUXQaSPduI="}],"size":13139,"noattachment":false,"key":"/checksum-stream/-/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":{},"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","publish_time":1487708114625,"_cnpm_publish_time":1487708114625,"dist-tags":{"latest":"1.0.3"}}