{
  "_args": [
    [
      {
        "raw": "JSONStream@^1.0.3",
        "scope": null,
        "escapedName": "JSONStream",
        "name": "JSONStream",
        "rawSpec": "^1.0.3",
        "spec": ">=1.0.3 <2.0.0",
        "type": "range"
      },
      "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browserify"
    ]
  ],
  "_from": "JSONStream@^1.0.3",
  "_hasShrinkwrap": false,
  "_id": "JSONStream@1.3.5",
  "_location": "/JSONStream",
  "_nodeVersion": "8.11.4",
  "_npmOperationalInternal": {
    "host": "s3://npm-registry-packages",
    "tmp": "tmp/JSONStream_1.3.5_1539480241388_0.433165017857954"
  },
  "_npmUser": {
    "name": "dominictarr",
    "email": "dominic.tarr@gmail.com"
  },
  "_npmVersion": "5.6.0",
  "_phantomChildren": {},
  "_requested": {
    "raw": "JSONStream@^1.0.3",
    "scope": null,
    "escapedName": "JSONStream",
    "name": "JSONStream",
    "rawSpec": "^1.0.3",
    "spec": ">=1.0.3 <2.0.0",
    "type": "range"
  },
  "_requiredBy": [
    "/browser-pack",
    "/browserify",
    "/deps-sort",
    "/insert-module-globals",
    "/module-deps"
  ],
  "_resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
  "_shasum": "3208c1f08d3a4d99261ab64f92302bc15e111ca0",
  "_shrinkwrap": null,
  "_spec": "JSONStream@^1.0.3",
  "_where": "E:\\Mine\\Project\\git\\laya\\dawawa\\layaairdoc_cmd\\node_modules\\browserify",
  "author": {
    "name": "Dominic Tarr",
    "email": "dominic.tarr@gmail.com",
    "url": "http://bit.ly/dominictarr"
  },
  "bin": {
    "JSONStream": "./bin.js"
  },
  "bugs": {
    "url": "https://github.com/dominictarr/JSONStream/issues"
  },
  "dependencies": {
    "jsonparse": "^1.2.0",
    "through": ">=2.2.7 <3"
  },
  "description": "rawStream.pipe(JSONStream.parse()).pipe(streamOfObjects)",
  "devDependencies": {
    "assertions": "~2.2.2",
    "event-stream": "~0.7.0",
    "it-is": "~1",
    "render": "~0.1.1",
    "tape": "~2.12.3",
    "trees": "~0.0.3"
  },
  "directories": {},
  "dist": {
    "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==",
    "shasum": "3208c1f08d3a4d99261ab64f92302bc15e111ca0",
    "tarball": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
    "fileCount": 36,
    "unpackedSize": 409229,
    "npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbwpqyCRA9TVsSAnZWagAATKgQAJj+CSU+Isxw49SeYUak\nG1cJpUXNyndXXShRZ41/hZDY6XjdnMcczJ5sc5SSP/pweBX2UExz8/bORiLk\nE9F9EDXFVJpJFhuoK2tpQHb5VWMmzxgj8JntOu6C+Jy2sexSK+dcL/80Hrk0\nY5Spg56SPsHyhM0P+BrT+mXM1UjVLWGD6ThMiPDW1u1oMcn6FqlcWva+xkiY\nEyRiehdIsvDn3f0UWcADx0I09CzsXdkUW0GYSf+y6aBmUoJep6CCfSFMlEwW\neY9cVgJbvvFhNae8+mUWt/mpQZZFaiYSFXkLXGkShDyDIu+MrenXdeC0MP5t\n8u/kUoQaqDGz4PLJ6w0bF/hE1Q3FCS43/xvQLOErfH8pxIqiebY+9l4obwiP\n5UW4NcoQufdgkBcoKVmS/Iof+m7bDW/TIPZPBHbRh1tHYpnv5G/7sWyyNh/v\n63LQDwec5H6fhhFhYa7xC1QxJWlBMR+JPHZEynTnXezxsbFgRBJYyr9H9td4\nn5mu8Lwa3WPtxVo86mDC4Oe/NEmRT/Sc05i+LbTMuzOnlft6C+xc6BkydFzv\nLoZDnRJwfLND5DvO31TMVq4NDv68sB0ZXUxUb2Y+Eel938zOSAh8k2Aco+mt\nEMThUy4DDqQdIq92b3fKkqKkjHXLUDbFsO2kjtXR6D/+NnHGoSK0GedqjUi8\n4X/s\r\n=UWcz\r\n-----END PGP SIGNATURE-----\r\n"
  },
  "engines": {
    "node": "*"
  },
  "gitHead": "0593d4b4e6c63c6c0e2e68463538fd83bd1eb964",
  "homepage": "http://github.com/dominictarr/JSONStream",
  "keywords": [
    "json",
    "stream",
    "streaming",
    "parser",
    "async",
    "parsing"
  ],
  "license": "(MIT OR Apache-2.0)",
  "maintainers": [
    {
      "name": "daern91",
      "email": "daern91@gmail.com"
    },
    {
      "name": "dominictarr",
      "email": "dominic.tarr@gmail.com"
    },
    {
      "name": "doowb",
      "email": "brian.woodward@gmail.com"
    }
  ],
  "name": "JSONStream",
  "optionalDependencies": {},
  "readme": "# JSONStream\n\nstreaming JSON.parse and stringify\n\n![](https://secure.travis-ci.org/dominictarr/JSONStream.png?branch=master)\n\n## install\n```npm install JSONStream```\n\n## example\n\n``` js\n\nvar request = require('request')\n  , JSONStream = require('JSONStream')\n  , es = require('event-stream')\n\nrequest({url: 'http://isaacs.couchone.com/registry/_all_docs'})\n  .pipe(JSONStream.parse('rows.*'))\n  .pipe(es.mapSync(function (data) {\n    console.error(data)\n    return data\n  }))\n```\n\n## JSONStream.parse(path)\n\nparse stream of values that match a path\n\n``` js\n  JSONStream.parse('rows.*.doc')\n```\n\nThe `..` operator is the recursive descent operator from [JSONPath](http://goessner.net/articles/JsonPath/), which will match a child at any depth (see examples below).\n\nIf your keys have keys that include `.` or `*` etc, use an array instead.\n`['row', true, /^doc/]`.\n\nIf you use an array, `RegExp`s, booleans, and/or functions. The `..` operator is also available in array representation, using `{recurse: true}`.\nany object that matches the path will be emitted as 'data' (and `pipe`d down stream)\n\nIf `path` is empty or null, no 'data' events are emitted.\n\nIf you want to have keys emitted, you can prefix your `*` operator with `$`: `obj.$*` - in this case the data passed to the stream is an object with a `key` holding the key and a `value` property holding the data.\n\n### Examples\n\nquery a couchdb view:\n\n``` bash\ncurl -sS localhost:5984/tests/_all_docs&include_docs=true\n```\nyou will get something like this:\n\n``` js\n{\"total_rows\":129,\"offset\":0,\"rows\":[\n  { \"id\":\"change1_0.6995461115147918\"\n  , \"key\":\"change1_0.6995461115147918\"\n  , \"value\":{\"rev\":\"1-e240bae28c7bb3667f02760f6398d508\"}\n  , \"doc\":{\n      \"_id\":  \"change1_0.6995461115147918\"\n    , \"_rev\": \"1-e240bae28c7bb3667f02760f6398d508\",\"hello\":1}\n  },\n  { \"id\":\"change2_0.6995461115147918\"\n  , \"key\":\"change2_0.6995461115147918\"\n  , \"value\":{\"rev\":\"1-13677d36b98c0c075145bb8975105153\"}\n  , \"doc\":{\n      \"_id\":\"change2_0.6995461115147918\"\n    , \"_rev\":\"1-13677d36b98c0c075145bb8975105153\"\n    , \"hello\":2\n    }\n  },\n]}\n\n```\n\nwe are probably most interested in the `rows.*.doc`\n\ncreate a `Stream` that parses the documents from the feed like this:\n\n``` js\nvar stream = JSONStream.parse(['rows', true, 'doc']) //rows, ANYTHING, doc\n\nstream.on('data', function(data) {\n  console.log('received:', data);\n});\n//emits anything from _before_ the first match\nstream.on('header', function (data) {\n  console.log('header:', data) // => {\"total_rows\":129,\"offset\":0}\n})\n\n```\nawesome!\n\nIn case you wanted the contents the doc emitted:\n\n``` js\nvar stream = JSONStream.parse(['rows', true, 'doc', {emitKey: true}]) //rows, ANYTHING, doc, items in docs with keys\n\nstream.on('data', function(data) {\n  console.log('key:', data.key);\n  console.log('value:', data.value);\n});\n\n```\n\nYou can also emit the path:\n\n``` js\nvar stream = JSONStream.parse(['rows', true, 'doc', {emitPath: true}]) //rows, ANYTHING, doc, items in docs with keys\n\nstream.on('data', function(data) {\n  console.log('path:', data.path);\n  console.log('value:', data.value);\n});\n\n```\n\n### recursive patterns (..)\n\n`JSONStream.parse('docs..value')` \n(or `JSONStream.parse(['docs', {recurse: true}, 'value'])` using an array)\nwill emit every `value` object that is a child, grand-child, etc. of the \n`docs` object. In this example, it will match exactly 5 times at various depth\nlevels, emitting 0, 1, 2, 3 and 4 as results.\n\n```js\n{\n  \"total\": 5,\n  \"docs\": [\n    {\n      \"key\": {\n        \"value\": 0,\n        \"some\": \"property\"\n      }\n    },\n    {\"value\": 1},\n    {\"value\": 2},\n    {\"blbl\": [{}, {\"a\":0, \"b\":1, \"value\":3}, 10]},\n    {\"value\": 4}\n  ]\n}\n```\n\n## JSONStream.parse(pattern, map)\n\nprovide a function that can be used to map or filter\nthe json output. `map` is passed the value at that node of the pattern,\nif `map` return non-nullish (anything but `null` or `undefined`)\nthat value will be emitted in the stream. If it returns a nullish value,\nnothing will be emitted.\n\n`JSONStream` also emits `'header'` and `'footer'` events,\nthe `'header'` event contains anything in the output that was before\nthe first match, and the `'footer'`, is anything after the last match.\n\n## JSONStream.stringify(open, sep, close)\n\nCreate a writable stream.\n\nyou may pass in custom `open`, `close`, and `seperator` strings.\nBut, by default, `JSONStream.stringify()` will create an array,\n(with default options `open='[\\n', sep='\\n,\\n', close='\\n]\\n'`)\n\nIf you call `JSONStream.stringify(false)`\nthe elements will only be seperated by a newline.\n\nIf you only write one item this will be valid JSON.\n\nIf you write many items,\nyou can use a `RegExp` to split it into valid chunks.\n\n## JSONStream.stringifyObject(open, sep, close)\n\nVery much like `JSONStream.stringify`,\nbut creates a writable stream for objects instead of arrays.\n\nAccordingly, `open='{\\n', sep='\\n,\\n', close='\\n}\\n'`.\n\nWhen you `.write()` to the stream you must supply an array with `[ key, data ]`\nas the first argument.\n\n## unix tool\n\nquery npm to see all the modules that browserify has ever depended on.\n\n``` bash\ncurl https://registry.npmjs.org/browserify | JSONStream 'versions.*.dependencies'\n```\n\n## numbers\n\nnumbers will be emitted as numbers.\nhuge numbers that cannot be represented in memory as javascript numbers will be emitted as strings.\ncf https://github.com/creationix/jsonparse/commit/044b268f01c4b8f97fb936fc85d3bcfba179e5bb for details.\n\n## Acknowlegements\n\nthis module depends on https://github.com/creationix/jsonparse\nby Tim Caswell\nand also thanks to Florent Jaby for teaching me about parsing with:\nhttps://github.com/Floby/node-json-streams\n\n## license\n\nDual-licensed under the MIT License or the Apache License, version 2.0\n\n",
  "readmeFilename": "readme.markdown",
  "repository": {
    "type": "git",
    "url": "git://github.com/dominictarr/JSONStream.git"
  },
  "scripts": {
    "test": "node test/run.js"
  },
  "version": "1.3.5"
}
