{"_id":"stream-forward","_rev":"7-89041d9585db1a749660d4b4decbc438","name":"stream-forward","description":"Forward stream events.","dist-tags":{"latest":"3.0.0"},"versions":{"1.0.0":{"name":"stream-forward","version":"1.0.0","description":"Forward stream events.","main":"index.js","scripts":{"test":"mocha test --timeout 5000"},"files":["index.js","license"],"keywords":["stream","forward","event"],"author":"","license":"MIT","dependencies":{"stubs":"^2.0.0"},"devDependencies":{"mocha":"^2.2.5","request":"^2.58.0","through2":"^2.0.0"},"gitHead":"2ac0c2adcef104e27151c0b898723e6e0907b2e7","_id":"stream-forward@1.0.0","_shasum":"a5f9e1400deed50f530a58dc039ed54cb529ecbc","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"dist":{"shasum":"a5f9e1400deed50f530a58dc039ed54cb529ecbc","tarball":"https://registry.npmjs.org/stream-forward/-/stream-forward-1.0.0.tgz","integrity":"sha512-l4gik3SEJ43TpQ50i5yyDRdUKWyu5l9zkYoxm7IU2Bh1aHp62zQINNXMy1GyPDf8HcuzasbrGLSO44zM+YsIpQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCkaCvxCtBJk4LSe2ibNLoVDgJYCeU0Pe2CTxWHxojTcQIgfKq2EeTK/LqXKqW8MlHDvzQBqt99GyDW/H3/RSD+XoI="}]},"maintainers":[{"name":"stephenplusplus","email":"sawchuk@gmail.com"}]},"2.0.0":{"name":"stream-forward","version":"2.0.0","description":"Forward stream events.","main":"index.js","scripts":{"test":"mocha test --timeout 5000"},"files":["index.js","license"],"keywords":["stream","forward","event"],"author":"","license":"MIT","dependencies":{"array-to-map":"^1.0.2","on-everything":"^1.0.0","stubs":"^2.0.0"},"devDependencies":{"mocha":"^2.2.5","request":"^2.58.0","through2":"^2.0.0"},"gitHead":"177d4469fdf29e990ce7479461a7a0456d4ad366","_id":"stream-forward@2.0.0","_shasum":"7938439f95c192de07eb1986dff9e174098430db","_from":".","_npmVersion":"2.11.2","_nodeVersion":"0.12.5","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"dist":{"shasum":"7938439f95c192de07eb1986dff9e174098430db","tarball":"https://registry.npmjs.org/stream-forward/-/stream-forward-2.0.0.tgz","integrity":"sha512-Ic87c5CKq6wW2wMGwtibm0f7BGMwzY/A19nAuIjmby+Y0p46LTwc2bt/c6LwPTngsh7r8lXPVyIMIg0QJ0kqfw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFv4VZsPOUaTc559qjEsa0jXnQco4QOZ7WwlovpBy8BqAiEA/AAEVcVK7LFr4YJlO/hAtAHcFLTh7kDzjF4M7TrNxcA="}]},"maintainers":[{"name":"stephenplusplus","email":"sawchuk@gmail.com"}]},"2.0.1":{"name":"stream-forward","version":"2.0.1","description":"Forward stream events.","main":"index.js","scripts":{"test":"mocha test --timeout 5000"},"files":["index.js","license"],"keywords":["stream","forward","event"],"author":"","license":"MIT","dependencies":{"array-to-map":"^1.0.2","on-everything":"^1.0.0","stubs":"^2.0.0"},"devDependencies":{"mocha":"^2.2.5","request":"^2.58.0","through2":"^2.0.0"},"gitHead":"b6ac78ea69156eb3b0d281256796aaf02f32d322","_id":"stream-forward@2.0.1","_shasum":"802355840ce73f51b8f8b71b1bd3533dc3811426","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"dist":{"shasum":"802355840ce73f51b8f8b71b1bd3533dc3811426","tarball":"https://registry.npmjs.org/stream-forward/-/stream-forward-2.0.1.tgz","integrity":"sha512-1j/kjSy6mk4siVDri8x06K490rG7dgi6eRBmrU1a5IeFOCaT2QTCpxeWHtoTNdE/GkxTTBWarvMKHTIGicvQRg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHLkDUgIeUlZeH6BvCSuM/z6upiyY1qYX8IZXmGB6S54AiBIFLIN1ge4jSoD1kOcTh5fTitnoPOFrNvdySkdvDHQsQ=="}]},"maintainers":[{"name":"stephenplusplus","email":"sawchuk@gmail.com"}]},"3.0.0":{"name":"stream-forward","version":"3.0.0","description":"Forward stream events.","main":"index.js","scripts":{"test":"mocha test --timeout 5000"},"files":["index.js","license"],"keywords":["stream","forward","event"],"author":"","license":"MIT","dependencies":{"arrify":"^1.0.0","stubs":"^2.0.0"},"devDependencies":{"mocha":"^2.2.5","request":"^2.58.0","through2":"^2.0.0"},"gitHead":"0655dc1411df97fd0b84bf504d37d770eb83827e","_id":"stream-forward@3.0.0","_shasum":"4bd569d08b59b1177e8b6dfaef0af64beae9fd20","_from":".","_npmVersion":"2.11.3","_nodeVersion":"0.12.7","_npmUser":{"name":"stephenplusplus","email":"sawchuk@gmail.com"},"dist":{"shasum":"4bd569d08b59b1177e8b6dfaef0af64beae9fd20","tarball":"https://registry.npmjs.org/stream-forward/-/stream-forward-3.0.0.tgz","integrity":"sha512-K71BafdS95E44HCVNCTV3Ib5o7Q7KyvXaLaACDKX4H1ZRv+T5G0XDNpDp1GTiUJWWku57qcGtIj2aWz4Ur2Zyg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCHb0ptTrKCABBQXUKd4iQHal1GI6joG60l5FzUFIF6CgIgWAplYA51kJiV5XP9JRCLzP3Nc9/FXJM/mLnAYAK47VE="}]},"maintainers":[{"name":"stephenplusplus","email":"sawchuk@gmail.com"}]}},"readme":"# stream-forward\n\n> Forward events to the next stream in the pipeline.\n\n## Use\n\n```sh\n$ npm install --save stream-forward\n```\n```js\nvar streamForward = require('stream-forward');\n```\n\n## Example\n\n```js\nvar streamForward = require('stream-forward');\nvar request = require('request');\n\nvar opts = {\n  events: ['response']\n};\n\nstreamForward(request('http://yahoo.com'), opts)\n  .pipe(process.stdout)\n  .on('response', function (response) {\n    // `response` from the request stream.\n  });\n```\n\n**Note: don't neglect proper event handling on the individual parts of your stream.**\n\nThis is just a convenience when you have to manually listen and re-emit events across a middleman/spy pipe. Consider the following example:\n\n```js\nvar fs = require('fs');\n\nfunction getRequestStream(reqOpts) {\n  var opts = {\n    events: ['complete']\n  };\n\n  return streamForward(request(reqOpts), opts)\n    .pipe(fs.createWriteStream('./request-cache'));\n}\n\ngetRequestStream('http://yahoo.com')\n  .on('complete', function () {\n    // Without `stream-forward`, this couldn't emit.\n  });\n```\n\n## stream = streamForward(stream, [options]);\n\n\n### stream\n\nType: `Stream`\n\nThe source stream to spy on. This is returned from the function to allow chaining.\n\n\n### options\n\n*Optional.* Configuration options.\n\n\n#### options.continuous\n\nType: `Boolean`\n<br>Default: `false`\n\nIf true, when a new stream is attached to `stream`, it will receive the events emitted by the original.\n\n##### Disabled (default)\n```js\nvar sourceStream = request('http://yahoo.com');\nvar through = require('through2');\n\nstreamForward(sourceStream)\n  .pipe(through())\n  .on('complete', function () {\n    // Called.\n  })\n  .pipe(through())\n  .on('complete', function () {\n    // Not called.\n  });\n```\n\n##### Enabled\n```js\nvar sourceStream = request('http://yahoo.com');\nvar through = require('through2');\n\nstreamForward(sourceStream, { continuous: true })\n  .pipe(through())\n  .on('complete', function () {\n    // Called.\n  })\n  .pipe(through())\n  .on('complete', function () {\n    // Called.\n  });\n```\n\n\n#### options.events\n\nType: `Array`\n\nEvent names to re-emit on attached streams.\n","maintainers":[{"name":"stephenplusplus","email":"sawchuk@gmail.com"}],"time":{"modified":"2022-06-27T00:46:57.926Z","created":"2015-07-07T20:17:50.172Z","1.0.0":"2015-07-07T20:17:50.172Z","2.0.0":"2015-07-12T22:00:21.890Z","2.0.1":"2015-08-17T18:37:49.220Z","3.0.0":"2015-08-19T00:31:10.856Z"},"keywords":["stream","forward","event"],"license":"MIT","readmeFilename":"readme.md","users":{"vunb":true}}