{"name":"geojson-stream","version":"0.0.1","description":"stream features into and out of geojson","main":"index.js","scripts":{"test":"tap test/*.js"},"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.0.1","tap":"~0.4.9"},"gitHead":"8fda13a40b64e053ee091edbf706972a6d049adb","homepage":"https://github.com/tmcw/geojson-stream#readme","_id":"geojson-stream@0.0.1","_shasum":"1a1d617167041c7302a45470318164699761502f","_from":".","_npmVersion":"3.3.9","_nodeVersion":"0.10.39","_npmUser":{"name":"tmcw","email":"tom@macwright.org"},"maintainers":[{"name":"tmcw","email":"tom@macwright.org"}],"dist":{"shasum":"1a1d617167041c7302a45470318164699761502f","tarball":"http://registry-npm.ywwl.com/geojson-stream/download/geojson-stream-0.0.1.tgz","integrity":"sha512-6IwBCLlgXToI/tg1wljWpujxxv8ZfqMiLt5SEgMSF/t4KcEpoyfwXVqwsKVF/+vVUnLiamWVlIo0fB+JtKDQ2A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIHVyGs+zf9L0rbfmdPSXzhvykx6MgJrpLMpj6M+j0/SKAiAEfV3a253ZvUMsyyjE25dzCLUQygdWsIRr/BdooQkQEw=="}],"size":1615,"noattachment":false,"key":"/geojson-stream/-/geojson-stream-0.0.1.tgz"},"directories":{},"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":1446671829131,"_cnpm_publish_time":1446671829131,"dist-tags":{"latest":"0.1.0"}}