{
  "_args": [
    [
      {
        "raw": "through2@https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
        "scope": null,
        "escapedName": "through2",
        "name": "through2",
        "rawSpec": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
        "spec": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
        "type": "remote"
      },
      "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin"
    ]
  ],
  "_from": "through2@>=2.0.0 <3.0.0",
  "_id": "through2@2.0.3",
  "_inCache": true,
  "_location": "/firebase-admin/through2",
  "_phantomChildren": {},
  "_requested": {
    "raw": "through2@https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
    "scope": null,
    "escapedName": "through2",
    "name": "through2",
    "rawSpec": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
    "spec": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
    "type": "remote"
  },
  "_requiredBy": [
    "/firebase-admin",
    "/firebase-admin/@google-cloud/common",
    "/firebase-admin/@google-cloud/storage",
    "/firebase-admin/gcs-resumable-upload",
    "/firebase-admin/hash-stream-validation",
    "/firebase-admin/retry-request"
  ],
  "_resolved": "https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
  "_shasum": "0004569b37c7c74ba39c43f3ced78d1ad94140be",
  "_shrinkwrap": null,
  "_spec": "through2@https://registry.npmjs.org/through2/-/through2-2.0.3.tgz",
  "_where": "E:\\MissionXJC\\XJC\\functions\\node_modules\\firebase-admin",
  "author": {
    "name": "Rod Vagg",
    "email": "r@va.gg",
    "url": "https://github.com/rvagg"
  },
  "bugs": {
    "url": "https://github.com/rvagg/through2/issues"
  },
  "dependencies": {
    "readable-stream": "^2.1.5",
    "xtend": "~4.0.1"
  },
  "description": "A tiny wrapper around Node streams2 Transform to avoid explicit subclassing noise",
  "devDependencies": {
    "bl": "~1.1.2",
    "faucet": "0.0.1",
    "stream-spigot": "~3.0.5",
    "tape": "~4.6.2"
  },
  "homepage": "https://github.com/rvagg/through2#readme",
  "keywords": [
    "stream",
    "streams2",
    "through",
    "transform"
  ],
  "license": "MIT",
  "main": "through2.js",
  "name": "through2",
  "optionalDependencies": {},
  "readme": "# through2\n\n[![NPM](https://nodei.co/npm/through2.png?downloads&downloadRank)](https://nodei.co/npm/through2/)\n\n**A tiny wrapper around Node streams.Transform (Streams2) to avoid explicit subclassing noise**\n\nInspired by [Dominic Tarr](https://github.com/dominictarr)'s [through](https://github.com/dominictarr/through) in that it's so much easier to make a stream out of a function than it is to set up the prototype chain properly: `through(function (chunk) { ... })`.\n\nNote: As 2.x.x this module starts using **Streams3** instead of Stream2. To continue using a Streams2 version use `npm install through2@0` to fetch the latest version of 0.x.x. More information about Streams2 vs Streams3 and recommendations see the article **[Why I don't use Node's core 'stream' module](http://r.va.gg/2014/06/why-i-dont-use-nodes-core-stream-module.html)**.\n\n```js\nfs.createReadStream('ex.txt')\n  .pipe(through2(function (chunk, enc, callback) {\n    for (var i = 0; i < chunk.length; i++)\n      if (chunk[i] == 97)\n        chunk[i] = 122 // swap 'a' for 'z'\n\n    this.push(chunk)\n\n    callback()\n   }))\n  .pipe(fs.createWriteStream('out.txt'))\n  .on('finish', function () {\n    doSomethingSpecial()\n  })\n```\n\nOr object streams:\n\n```js\nvar all = []\n\nfs.createReadStream('data.csv')\n  .pipe(csv2())\n  .pipe(through2.obj(function (chunk, enc, callback) {\n    var data = {\n        name    : chunk[0]\n      , address : chunk[3]\n      , phone   : chunk[10]\n    }\n    this.push(data)\n\n    callback()\n  }))\n  .on('data', function (data) {\n    all.push(data)\n  })\n  .on('end', function () {\n    doSomethingSpecial(all)\n  })\n```\n\nNote that `through2.obj(fn)` is a convenience wrapper around `through2({ objectMode: true }, fn)`.\n\n## API\n\n<b><code>through2([ options, ] [ transformFunction ] [, flushFunction ])</code></b>\n\nConsult the **[stream.Transform](http://nodejs.org/docs/latest/api/stream.html#stream_class_stream_transform)** documentation for the exact rules of the `transformFunction` (i.e. `this._transform`) and the optional `flushFunction` (i.e. `this._flush`).\n\n### options\n\nThe options argument is optional and is passed straight through to `stream.Transform`. So you can use `objectMode:true` if you are processing non-binary streams (or just use `through2.obj()`).\n\nThe `options` argument is first, unlike standard convention, because if I'm passing in an anonymous function then I'd prefer for the options argument to not get lost at the end of the call:\n\n```js\nfs.createReadStream('/tmp/important.dat')\n  .pipe(through2({ objectMode: true, allowHalfOpen: false },\n    function (chunk, enc, cb) {\n      cb(null, 'wut?') // note we can use the second argument on the callback\n                       // to provide data as an alternative to this.push('wut?')\n    }\n  )\n  .pipe(fs.createWriteStream('/tmp/wut.txt'))\n```\n\n### transformFunction\n\nThe `transformFunction` must have the following signature: `function (chunk, encoding, callback) {}`. A minimal implementation should call the `callback` function to indicate that the transformation is done, even if that transformation means discarding the chunk.\n\nTo queue a new chunk, call `this.push(chunk)`&mdash;this can be called as many times as required before the `callback()` if you have multiple pieces to send on.\n\nAlternatively, you may use `callback(err, chunk)` as shorthand for emitting a single chunk or an error.\n\nIf you **do not provide a `transformFunction`** then you will get a simple pass-through stream.\n\n### flushFunction\n\nThe optional `flushFunction` is provided as the last argument (2nd or 3rd, depending on whether you've supplied options) is called just prior to the stream ending. Can be used to finish up any processing that may be in progress.\n\n```js\nfs.createReadStream('/tmp/important.dat')\n  .pipe(through2(\n    function (chunk, enc, cb) { cb(null, chunk) }, // transform is a noop\n    function (cb) { // flush function\n      this.push('tacking on an extra buffer to the end');\n      cb();\n    }\n  ))\n  .pipe(fs.createWriteStream('/tmp/wut.txt'));\n```\n\n<b><code>through2.ctor([ options, ] transformFunction[, flushFunction ])</code></b>\n\nInstead of returning a `stream.Transform` instance, `through2.ctor()` returns a **constructor** for a custom Transform. This is useful when you want to use the same transform logic in multiple instances.\n\n```js\nvar FToC = through2.ctor({objectMode: true}, function (record, encoding, callback) {\n  if (record.temp != null && record.unit == \"F\") {\n    record.temp = ( ( record.temp - 32 ) * 5 ) / 9\n    record.unit = \"C\"\n  }\n  this.push(record)\n  callback()\n})\n\n// Create instances of FToC like so:\nvar converter = new FToC()\n// Or:\nvar converter = FToC()\n// Or specify/override options when you instantiate, if you prefer:\nvar converter = FToC({objectMode: true})\n```\n\n## See Also\n\n  - [through2-map](https://github.com/brycebaril/through2-map) - Array.prototype.map analog for streams.\n  - [through2-filter](https://github.com/brycebaril/through2-filter) - Array.prototype.filter analog for streams.\n  - [through2-reduce](https://github.com/brycebaril/through2-reduce) - Array.prototype.reduce analog for streams.\n  - [through2-spy](https://github.com/brycebaril/through2-spy) - Wrapper for simple stream.PassThrough spies.\n  - the [mississippi stream utility collection](https://github.com/maxogden/mississippi) includes `through2` as well as many more useful stream modules similar to this one\n\n## License\n\n**through2** is Copyright (c) 2013 Rod Vagg [@rvagg](https://twitter.com/rvagg) and licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE file for more details.\n",
  "readmeFilename": "README.md",
  "repository": {
    "type": "git",
    "url": "git+https://github.com/rvagg/through2.git"
  },
  "scripts": {
    "test": "node test/test.js | faucet",
    "test-local": "brtapsauce-local test/basic-test.js"
  },
  "version": "2.0.3"
}
