{"_id":"stream-exhaust","_rev":"11-9273089012a939dcb3d5b7f12469b850","name":"stream-exhaust","dist-tags":{"latest":"1.0.2"},"versions":{"1.0.0":{"name":"stream-exhaust","version":"1.0.0","author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"license":"MIT","_id":"stream-exhaust@1.0.0","maintainers":[{"name":"chrisdickinson","email":"chris@neversaw.us"}],"homepage":"https://github.com/chrisdickinson/stream-exhaust.git","bugs":{"url":"https://github.com/chrisdickinson/stream-exhaust.git"},"dist":{"shasum":"edc3579ea69ed9050360a9ced8e9f9e6a18fe70d","tarball":"https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.0.tgz","integrity":"sha512-9u4ShDMHmGdKC7E8h+Mv8gPWnMsnkDx3CapmRdS60l5Bzue9S/PmS4aY3UJILS1GXZROHxnhGHLmh2b2SEvNIg==","signatures":[{"sig":"MEUCIQD89Hs2D9ldjrhE9MP5rXezXgSIyI2Ti1wWltt1jFoluAIgFBjv6u+yTLm4zwDVADfHjPsKpspNwh/5jgmtkBTB4qI=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"edc3579ea69ed9050360a9ced8e9f9e6a18fe70d","gitHead":"5bb7a07afa475076a3177872096488f4363fdc16","scripts":{"test":"node test.js"},"_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"repository":{"url":"https://github.com/chrisdickinson/stream-exhaust.git","type":"git"},"_npmVersion":"1.4.14","description":"Ensure that a stream is flowing data without mutating it","devDependencies":{"tape":"^2.14.0","through2":"^0.5.1","readable-stream":"^1.0.31"},"directories":{}},"1.0.1":{"name":"stream-exhaust","version":"1.0.1","author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"license":"MIT","_id":"stream-exhaust@1.0.1","maintainers":[{"name":"chrisdickinson","email":"chris@neversaw.us"}],"homepage":"https://github.com/chrisdickinson/stream-exhaust.git","bugs":{"url":"https://github.com/chrisdickinson/stream-exhaust.git"},"dist":{"shasum":"c0c4455e54ce5a179ca8736e73334b4e7fd67553","tarball":"https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.1.tgz","integrity":"sha512-E6KFlI/xwax57rI1eZ3ewqsbR4fxAE3A2BdoK01Etb2ekWzx4xSl6swCgZvSP7Y8LMdwIh9Fx9uByD+Rcht2ag==","signatures":[{"sig":"MEQCIBPVAhmgduBEHKsjx9EELTlpwHvkP0JyYWhzOAJi7lXnAiA+9ggKU2aH1ADXTNsAuHCavh3RAHI/OVHg9W4adG5xCA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","_from":".","_shasum":"c0c4455e54ce5a179ca8736e73334b4e7fd67553","gitHead":"41f9415b2e1885994badb08e9e4c628c17d74a69","scripts":{"test":"node test.js"},"_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"repository":{"url":"https://github.com/chrisdickinson/stream-exhaust.git","type":"git"},"_npmVersion":"2.1.9","description":"Ensure that a stream is flowing data without mutating it","_nodeVersion":"0.10.34","devDependencies":{"tape":"^2.14.0","through2":"^0.5.1","readable-stream":"^1.0.31"},"directories":{}},"1.0.2":{"name":"stream-exhaust","version":"1.0.2","author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"license":"MIT","_id":"stream-exhaust@1.0.2","maintainers":[{"name":"chrisdickinson","email":"chris@neversaw.us"}],"homepage":"https://github.com/chrisdickinson/stream-exhaust.git","bugs":{"url":"https://github.com/chrisdickinson/stream-exhaust.git"},"dist":{"shasum":"acdac8da59ef2bc1e17a2c0ccf6c320d120e555d","tarball":"https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz","integrity":"sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==","signatures":[{"sig":"MEQCICCE3zHQgY/e8D3gsLXQd9TrBvqFn2MUw1OsmCuHtawMAiBA9Gdd4ETOoMSJN69UD2J/nGvwHHmgMWf811P4v116IA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}]},"main":"index.js","gitHead":"3142d2e2ac0eb301d561ddf501407fbd75ebb1ee","scripts":{"test":"node test.js"},"_npmUser":{"name":"chrisdickinson","email":"chris@neversaw.us"},"repository":{"url":"git+https://github.com/chrisdickinson/stream-exhaust.git","type":"git"},"_npmVersion":"5.3.0","description":"Ensure that a stream is flowing data without mutating it","_nodeVersion":"8.3.0","devDependencies":{"tape":"^2.14.0","through2":"^0.5.1","readable-stream":"^1.0.31"},"_npmOperationalInternal":{"tmp":"tmp/stream-exhaust-1.0.2.tgz_1504073634663_0.6293191735167056","host":"s3://npm-registry-packages"},"directories":{}}},"time":{"created":"2014-08-22T07:01:51.090Z","modified":"2026-10-27T16:34:28.006Z","1.0.0":"2014-08-22T07:01:51.090Z","1.0.1":"2015-01-19T00:43:31.174Z","1.0.2":"2017-08-30T06:13:54.801Z"},"bugs":{"url":"https://github.com/chrisdickinson/stream-exhaust.git"},"author":{"name":"Chris Dickinson","email":"chris@neversaw.us"},"license":"MIT","homepage":"https://github.com/chrisdickinson/stream-exhaust.git","repository":{"url":"git+https://github.com/chrisdickinson/stream-exhaust.git","type":"git"},"description":"Ensure that a stream is flowing data without mutating it","maintainers":[{"email":"blaine.bublitz@gmail.com","name":"phated"},{"email":"chris@neversaw.us","name":"chrisdickinson"}],"readme":"# stream-exhaust\n\nEnsure that the provided stream is flowing data, even if the stream hasn't been\npiped to another stream.\n\n```javascript\nvar exhaustively = require('stream-exhaust');\n\nexhaustively(fs.createReadStream(__filename))\n  .on('close', () => { console.log('all done, despite being streams{1+N}!') });\n```\n\n## Prior Art\n\nThis is based on [stream-consume](https://github.com/aroneous/stream-consume)\nby [aroneous](https://github.com/aroneous). It is a separate package because it has\ndifferent semantics:\n\n1. It does not call `.resume()` on streams2+ streams. streams2 streams monkeypatch `.pipe`\nwhen entering flowing mode; avoiding `resume()` avoids that fate.\n2. It does not examine `._readableState`; instead it checks for the presence of `._read`.\n\n## API\n\n### exhaust(Stream s) -> Stream s\n\nTakes a stream, `s`, and returns it. Ensures that the stream is flowing, either by calling\n`.resume()` if the stream is a streams1 stream, or by piping it to a \"black hole\" stream that\ncontinually asks for more data.\n\n## License\n\nMIT\n","readmeFilename":"README.md","users":{"usingthesystem":true}}