{"name":"geojson-stream","version":"0.1.0","description":"stream features into and out of geojson","main":"index.js","scripts":{"test":"tap test/*.js","release":"standard-version"},"repository":{"type":"git","url":"git://github.com/tmcw/geojson-stream.git"},"keywords":["geojson","stream","maps","json","pipe"],"author":{"name":"Tom MacWright"},"license":"BSD-2-Clause","bugs":{"url":"https://github.com/tmcw/geojson-stream/issues"},"dependencies":{"JSONStream":"^1.0.0","through":"^2.3.4"},"devDependencies":{"concat-stream":"~1.6.0","standard-version":"^4.4.0","tap":"~10.3.2"},"gitHead":"a5275bde793b00c29d0fbb3cb281cfe426fc34e7","homepage":"https://github.com/tmcw/geojson-stream#readme","_id":"geojson-stream@0.1.0","_npmVersion":"6.5.0","_nodeVersion":"10.14.1","_npmUser":{"name":"tmcw","email":"tom@macwright.org"},"dist":{"integrity":"sha512-svSg5fFXPaTiqzEBGXScA+nISaeC9rLvku2PH+wM5LToATUw2bLIrvls43ymnT9Xnp51nBPVyK9m4Af40KpJ7w==","shasum":"1b973b09c78f7bedc662b5f0b245ecdf162e90f1","tarball":"http://registry-npm.ywwl.com/geojson-stream/download/geojson-stream-0.1.0.tgz","fileCount":10,"unpackedSize":103980,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJcP7SPCRA9TVsSAnZWagAA1nYP/i6sjC16tqeks2uK3kvs\nN36wIPZ4jcpc91UpZYZkJutradhIq5lmEppLh59KGV1zKxR9VCij+LtH2fa2\n/q235Hbe4mu9vGp8PQfC+fdTvYs8Vx3E/7ZyGz6U0V99iRKX5KD0c8yf66bF\nwak8MJ3RKaKJQ/0XeglJm0Ju2YRCB6esJ0JUtaClhKbsaNjwzonbKWcaAiys\ndAR6J8bNcUFSTxICABLb+h/6bsI2idiCI+smhYnXbijsqhp0XoNZhlNhj9uy\ng5FUAMnnFabwu8AzmcGNxQ4+0dM2Cz9XSNGRN+9HcEhQ22RWbobSquuqpmXQ\n/66jYKe3f8XeVI4mPkH0gpXnAd0F/2CcQLmfvmNA8Gu1al6+QzkdRG35wOIW\n4gITdn9giX7ot+z88P7da0n8ZjOworY7sKKYFYGNWh7TXY2IRk9GoDQFfZeU\nd5onhn2YfE3nSlSg4OW6RU/5vsk/kJB7R7zR2MmsJZHzH0P7JfRszLvRKyEq\nxhevKo4OKaJp8TQ7BGfpjTzD4zHDVR5XFeZP72bEfhVQJRxGKUmnaKPJMwIV\n04+R/8k8mdYCJi9+DZdwONEo1ZHEQ9rEFDOIl27fd4v8hrOm1wZQzyCgziWu\nb5dSbiVlHBBykXlpmdTQNTKaA21eKTxKdsqttrqVfEOXjBCVHJZBs8fWzocs\nBj6P\r\n=Uq5m\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC1YnDwGo/EDRR3O+85FNvZqqxLb68vASEIYLXV7QsHDAiAVqGCbz/Dl5j48gS/mgtsA8Xqfmc3R8Hk8ytVUm733yA=="}],"size":29310,"noattachment":false,"key":"/geojson-stream/-/geojson-stream-0.1.0.tgz"},"maintainers":[{"email":"tom@macwright.org","name":"tmcw"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/geojson-stream_0.1.0_1547678862711_0.08583226652380138"},"_hasShrinkwrap":false,"readme":"# geojson-stream\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/tmcw/geojson-stream.svg)](https://greenkeeper.io/)\n[![build status](https://secure.travis-ci.org/tmcw/geojson-stream.svg)](http://travis-ci.org/tmcw/geojson-stream)\n\nStream features into and out of [GeoJSON](http://geojson.org/) objects\nand Feature Collections. Little more than [JSONStream](https://github.com/dominictarr/JSONStream)\nwith pre-filled settings.\n\n## usage\n\n    npm install --save geojson-stream\n\n## api\n\n### `geojsonStream.stringify()`\n\nReturns a transform stream that accepts GeoJSON Feature objects and emits\na stringified FeatureCollection.\n\n### `geojsonStream.parse(mapFunc)`\n\nReturns a transform stream that accepts a GeoJSON FeatureCollection as a stream\nand emits Feature objects.\n\n`mapFunc(feature, index)` is an optional function which takes a `Feature`, and its zero-based index in the `FeatureCollection` and returns either a `Feature`, or null/undefined \nif the feature should be omitted from output.\n\n## example\n\n```\nconst geojsonStream = require('geojson-stream');\nconst fs = require('fs');\nconst out = fs.createWriteStream('buildings-with-id.geojson');\nfs\n    .createReadStream(`buildings.geojson`)\n    .pipe(geojsonStream.parse((building, index) => {\n        if (building.geometry.coordinates === null) {\n            return null;\n        }\n        building.id = index;\n        return building;\n    }))\n    .pipe(geojsonStream.stringify())\n    .pipe(out);\n```","publish_time":1547678862820,"_cnpm_publish_time":1547678862820,"dist-tags":{"latest":"0.1.0"}}