{"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","tarball":"http://registry-npm.ywwl.com/checksum-stream/download/checksum-stream-1.0.2.tgz","integrity":"sha512-2mwnv98eGPGoTQOxKxZIel8jPUuBmAhyMgM/RJhDWkBRXxGS4uPdBqIFModRAVigRI0TzalaRLjw9mayxsj45g==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDAsc4rS1ZeTBsTSsG++TMB3dRaPXtTJiuqaxYO+ZoBAgIgBiMdNwAI2lGFwknV2LGiq6lb5ziFJSNTVeVKUViORBE="}],"size":13136,"noattachment":false,"key":"/checksum-stream/-/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":{},"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":1487556365514,"_cnpm_publish_time":1487556365514,"dist-tags":{"latest":"1.0.3"}}