{"_id":"to-through","_rev":"3943968","name":"to-through","description":"Wrap a Readable stream in a Transform stream.","dist-tags":{"latest":"3.0.0"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"time":{"modified":"2025-09-01T01:32:43.000Z","created":"2017-05-03T00:32:07.541Z","3.0.0":"2022-09-07T22:38:12.909Z","2.0.0":"2017-05-03T18:13:52.644Z","1.0.1":"2017-05-03T00:48:14.342Z","1.0.0":"2017-05-03T00:32:07.541Z"},"users":{},"author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"repository":{"type":"git","url":"git+https://github.com/gulpjs/to-through.git"},"versions":{"3.0.0":{"name":"to-through","version":"3.0.0","description":"Wrap a Readable stream in a Transform stream.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"https://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/to-through.git"},"license":"MIT","engines":{"node":">=10.13.0"},"main":"index.js","scripts":{"lint":"eslint .","pretest":"npm run lint","test":"nyc mocha --async-only"},"dependencies":{"streamx":"^2.12.5"},"devDependencies":{"eslint":"^7.32.0","eslint-config-gulp":"^5.0.1","eslint-plugin-node":"^11.1.0","expect":"^27.4.2","mocha":"^8.4.0","nyc":"^15.1.0","readable-stream":"^3.6.0"},"nyc":{"reporter":["lcov","text-summary"]},"prettier":{"singleQuote":true},"keywords":["transform","readable","through","wrap"],"gitHead":"2b662242043ee2dcd3d61f91db778448d4f05ea0","bugs":{"url":"https://github.com/gulpjs/to-through/issues"},"homepage":"https://github.com/gulpjs/to-through#readme","_id":"to-through@3.0.0","_nodeVersion":"16.14.2","_npmVersion":"8.11.0","dist":{"shasum":"bf4956eaca5a0476474850a53672bed6906ace54","size":3107,"noattachment":false,"key":"/to-through/-/to-through-3.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-through/download/to-through-3.0.0.tgz"},"_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"directories":{},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/to-through_3.0.0_1662590292753_0.22351092760893665"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2022-09-07T22:38:39.056Z","publish_time":1662590292909,"_cnpm_publish_time":1662590292909},"2.0.0":{"name":"to-through","version":"2.0.0","description":"Wrap a ReadableStream in a TransformStream.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/to-through.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint index.js test/ && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"through2":"^2.0.3"},"devDependencies":{"eslint":"^1.10.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.4.0","jscs-preset-gulp":"^1.0.0","mississippi":"^1.3.0","mocha":"^3.2.0"},"keywords":["transform","readable","through","wrap"],"gitHead":"535a3896be9b8afb9a435199eb153b089dccd55e","bugs":{"url":"https://github.com/gulpjs/to-through/issues"},"homepage":"https://github.com/gulpjs/to-through#readme","_id":"to-through@2.0.0","_shasum":"fc92adaba072647bc0b67d6b03664aa195093af6","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.41","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"fc92adaba072647bc0b67d6b03664aa195093af6","size":2596,"noattachment":false,"key":"/to-through/-/to-through-2.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-through/download/to-through-2.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/to-through-2.0.0.tgz_1493835232407_0.393965846626088"},"directories":{},"publish_time":1493835232644,"_cnpm_publish_time":1493835232644,"_hasShrinkwrap":false},"1.0.1":{"name":"to-through","version":"1.0.1","description":"Wrap a ReadableStream in a TransformStream.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/to-through.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint index.js test/ && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"through2":"^2.0.3"},"devDependencies":{"eslint":"^1.10.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.4.0","jscs-preset-gulp":"^1.0.0","mississippi":"^1.3.0","mocha":"^3.2.0"},"keywords":["transform","readable","through","wrap"],"gitHead":"0c1147256f731ebc3760a72ce71f82456ec0829c","bugs":{"url":"https://github.com/gulpjs/to-through/issues"},"homepage":"https://github.com/gulpjs/to-through#readme","_id":"to-through@1.0.1","_shasum":"274aba328c84d70b50be3d9322ed115da40f2eff","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.41","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"274aba328c84d70b50be3d9322ed115da40f2eff","size":2522,"noattachment":false,"key":"/to-through/-/to-through-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-through/download/to-through-1.0.1.tgz"},"_npmOperationalInternal":{"host":"packages-12-west.internal.npmjs.com","tmp":"tmp/to-through-1.0.1.tgz_1493772494064_0.6583631632383913"},"directories":{},"publish_time":1493772494342,"_hasShrinkwrap":false,"_cnpm_publish_time":1493772494342},"1.0.0":{"name":"to-through","version":"1.0.0","description":"Wrap a ReadableStream in a TransformStream.","author":{"name":"Gulp Team","email":"team@gulpjs.com","url":"http://gulpjs.com/"},"contributors":[{"name":"Blaine Bublitz","email":"blaine.bublitz@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/gulpjs/to-through.git"},"license":"MIT","engines":{"node":">= 0.10"},"main":"index.js","files":["LICENSE","index.js"],"scripts":{"lint":"eslint index.js test/ && jscs index.js test/","pretest":"npm run lint","test":"mocha --async-only","cover":"istanbul cover _mocha --report lcovonly","coveralls":"npm run cover && istanbul-coveralls"},"dependencies":{"through2":"^2.0.3"},"devDependencies":{"eslint":"^1.10.3","eslint-config-gulp":"^2.0.0","expect":"^1.20.2","istanbul":"^0.4.3","istanbul-coveralls":"^1.0.3","jscs":"^2.4.0","jscs-preset-gulp":"^1.0.0","mississippi":"^1.3.0","mocha":"^3.2.0"},"keywords":["transform","readable","through","wrap"],"gitHead":"28115f9d23bee350fc6cc2b25be21baf0f1deae1","bugs":{"url":"https://github.com/gulpjs/to-through/issues"},"homepage":"https://github.com/gulpjs/to-through#readme","_id":"to-through@1.0.0","_shasum":"25b0748021423ee5ce36d3aa9f5ddbee7b68699a","_from":".","_npmVersion":"2.15.2","_nodeVersion":"0.10.41","_npmUser":{"name":"phated","email":"blaine.bublitz@gmail.com"},"maintainers":[{"name":"phated","email":"blaine.bublitz@gmail.com"},{"name":"yocontra","email":""}],"dist":{"shasum":"25b0748021423ee5ce36d3aa9f5ddbee7b68699a","size":2497,"noattachment":false,"key":"/to-through/-/to-through-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/to-through/download/to-through-1.0.0.tgz"},"_npmOperationalInternal":{"host":"packages-18-east.internal.npmjs.com","tmp":"tmp/to-through-1.0.0.tgz_1493771525301_0.3525624929461628"},"directories":{},"publish_time":1493771527541,"_hasShrinkwrap":false,"_cnpm_publish_time":1493771527541}},"readme":"<p align=\"center\">\n  <a href=\"http://gulpjs.com\">\n    <img height=\"257\" width=\"114\" src=\"https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png\">\n  </a>\n</p>\n\n# to-through\n\n[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Build Status][ci-image]][ci-url] [![Coveralls Status][coveralls-image]][coveralls-url]\n\nWrap a `Readable` stream in a `Transform` stream.\n\n## Usage\n\n```js\nvar { Readable } = require('streamx');\nvar concat = require('concat-stream');\nvar toThrough = require('to-through');\n\nvar readable = Readable.from([' ', 'hello', ' ', 'world']);\n\n// Can be used as a Readable or Transform\nvar maybeTransform = toThrough(readable);\n\nReadable.from(['hi', ' ', 'there', ','])\n  .pipe(maybeTransform)\n  .pipe(\n    concat(function (result) {\n      // result === 'hi there, hello world'\n    })\n  );\n```\n\n## API\n\n### `toThrough(readableStream)`\n\nTakes a `Readable` stream as the only argument and returns a `Transform` stream wrapper. Any data\npiped into the `Transform` stream is piped passed along before any data from the wrapped `Readable` is injected into the stream.\n\n## License\n\nMIT\n\n<!-- prettier-ignore-start -->\n[downloads-image]: https://img.shields.io/npm/dm/to-through.svg?style=flat-square\n[npm-url]: https://www.npmjs.com/package/to-through\n[npm-image]: https://img.shields.io/npm/v/to-through.svg?style=flat-square\n\n[ci-url]: https://github.com/gulpjs/to-through/actions?query=workflow:dev\n[ci-image]: https://img.shields.io/github/workflow/status/gulpjs/to-through/dev?style=flat-square\n\n[coveralls-url]: https://coveralls.io/r/gulpjs/to-through\n[coveralls-image]: https://img.shields.io/coveralls/gulpjs/to-through/master.svg?style=flat-square\n<!-- prettier-ignore-end -->\n","_attachments":{},"homepage":"https://github.com/gulpjs/to-through#readme","bugs":{"url":"https://github.com/gulpjs/to-through/issues"},"license":"MIT"}