{"_id":"@2mann/geofire","_rev":"1-216333896b5ca29950f5150119eac7de","name":"@2mann/geofire","dist-tags":{"latest":"4.1.2"},"versions":{"4.1.2":{"name":"@2mann/geofire","description":"Location-based querying and filtering using Firebase","version":"4.1.2","author":{"name":"Firebase","url":"https://firebase.google.com/"},"homepage":"https://github.com/firebase/geofire-js/","repository":{"type":"git","url":"git+https://github.com/amaldare93/geofire-js.git"},"bugs":{"url":"https://github.com/firebase/geofire-js/issues"},"license":"MIT","keywords":["geoquery","location","firebase","realtime","geolocation"],"main":"dist/geofire.js","files":["dist/**","LICENSE","README.md","package.json"],"dependencies":{},"peerDependencies":{"firebase":"^2.4.0 || 3.x.x"},"devDependencies":{"coveralls":"2.11.4","firebase":"3.x.x","gulp":"3.9.0","gulp-concat":"2.6.0","gulp-ext-replace":"0.2.0","gulp-jshint":"1.11.2","gulp-karma":"0.0.5","gulp-uglify":"1.4.1","jasmine-core":"^2.5.2","jshint-stylish":"2.0.1","karma":"^0.13.22","karma-chrome-launcher":"0.2.0","karma-coverage":"0.5.2","karma-failed-reporter":"0.0.3","karma-firefox-launcher":"0.1.6","karma-jasmine":"0.3.6","karma-spec-reporter":"0.0.20","run-sequence":"^1.1.4","streamqueue":"0.1.1"},"scripts":{"test":"gulp test","travis":"gulp"},"gitHead":"495f4ffbaf170e59ca1996f5feed01b73f800903","_id":"@2mann/geofire@4.1.2","_npmVersion":"5.6.0","_nodeVersion":"9.4.0","_npmUser":{"name":"amaldare93","email":"amaldare93@gmail.com"},"dist":{"integrity":"sha512-/HpNAH+ztoe8JsG4jiSANw4vdyTUjxT6PncX3+u+ZTQ9xSXrkkHD6MfXLlAnx/7tWDaXv8GpoUJDyP+iLXZ6Sg==","shasum":"1b1bba61af027898db2353df76518151abc71a8d","tarball":"https://registry.npmjs.org/@2mann/geofire/-/geofire-4.1.2.tgz","fileCount":6,"unpackedSize":62733,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJa4enjCRA9TVsSAnZWagAAsugQAIpbSqcwSvZDHPGyo0mu\nL/SCxAPjiUc4JBhkZfCXskljxw59KdyTcLRFa6B2IA+bd0ZhIKsuaC/KxG2Y\nJgoon5L13bWcqvTfMtA/cpqrsbN8uGe4dlsp8mKeBAkotk9qfrt9W4g7m4Qp\n7GOcS0aEHfNuZzdkdinqHF8wfnlGtygzrGK//kHfPRFJddhmwOxuyEID4WDm\nH3WD33QMaBMitdTDnPJrAseazRVwCkU/a1QQRpEr2OEmTT67J6ZNpNpzNqMI\nI6XNnLuTRk7R9+shgcJmXZatYq9IqYibICcSM87C46KvzokPq6ep6nwl367n\ng+/0H9Hi7hxOjieuSnoaXzHcKJntTWist59LOy7psBk63p0PmJcAtSIP6F1T\n4jm2tV74ZUlaENN1CaGW6XZC+oURR76D+4uiILGXIkhab1gJzvUC4hsOh/IV\nCW21Y8KOIP5al5KVdZ7PI8BS2BgEZUEH8N14O1o3vZhMoaKJWLgilfr7/zMC\nprmVoWbS4WBEM/BlWKTceOzYgeCwoQakeheZ9ucp/9T5M6IEbOAKvGgQUBMy\nKL9tM0F5sEZx0psEVI8nkWOgYAoyUumQoCuCmsNGgXMToZV1LlKZUPOosibh\n0E9jUYI0limJ8j4PaFkNYCPAwyAOr2aRs01epX5N5EI6CryoKmGK7iDPaQUi\nL3nL\r\n=WUZV\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCR9+6623BFh1r8AVC9dyu8mfMVL70JpaTg7jwnRN6jZgIgHjqmt+nSarlgXBGu6eDYqB1VG2nkbl/VeJP8KZC1+Zg="}]},"maintainers":[{"name":"amaldare93","email":"amaldare93@gmail.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/geofire_4.1.2_1524754914223_0.9765815334404717"},"_hasShrinkwrap":false}},"time":{"created":"2018-04-26T15:01:54.141Z","4.1.2":"2018-04-26T15:01:54.288Z","modified":"2022-04-04T10:42:38.624Z"},"maintainers":[{"name":"amaldare93","email":"amaldare93@gmail.com"}],"description":"Location-based querying and filtering using Firebase","homepage":"https://github.com/firebase/geofire-js/","keywords":["geoquery","location","firebase","realtime","geolocation"],"repository":{"type":"git","url":"git+https://github.com/amaldare93/geofire-js.git"},"author":{"name":"Firebase","url":"https://firebase.google.com/"},"bugs":{"url":"https://github.com/firebase/geofire-js/issues"},"license":"MIT","readme":"# FORK NOTES\nThe purpose of this fork is to allow the `set` method to take additional data and put it in the firebase node (ie: timestamp)\n\nWe can now pass a third argument to `set` with an object and each property will be added to the geofire node\n\nex:\n```js\nexport function setUserLocation (uid, coords) {\n  return geoFireRef.set(uid, coords, {\n    t: database.ServerValue.TIMESTAMP,\n  })\n}\n```\n\nThis payload will be surfaced via the `key_added` and `key_moved` callbacks as the fourth argument (all the raw data will be in that object including the geohash and coordinates)\n\nex:\n```js\nthis.geoQuery.on('key_entered', (key, coords, distance, payload) => {\n  if (key !== this.props.currentUserId) {\n    this.props.addUser({\n      uid: key,\n      timestamp: payload.t,\n    })\n  }\n})\n```\n\nNOTE: it will always and only use the payload passed as the 3rd argument\nIf you pass an array of points to set, there is no support for each node having its own payload, it will just use whatever is passed as third argument for each node.\nThis can be changed but im lazy and i dont have a usecase for it ATM\n\n# GeoFire for JavaScript [![Build Status](https://travis-ci.org/firebase/geofire-js.svg?branch=master)](https://travis-ci.org/firebase/geofire-js) [![Coverage Status](https://coveralls.io/repos/github/firebase/geofire-js/badge.svg?branch=master)](https://coveralls.io/github/firebase/geofire-js?branch=master) [![Version](https://badge.fury.io/gh/firebase%2Fgeofire-js.svg)](http://badge.fury.io/gh/firebase%2Fgeofire-js)\n\nGeoFire is an open-source library that allows you to store and query a set of keys based on their\ngeographic location. At its heart, GeoFire simply stores locations with string keys. Its main\nbenefit, however, is the possibility of retrieving only those keys within a given geographic\narea - all in realtime.\n\nGeoFire uses the [Firebase Realtime Database](https://firebase.google.com/docs/database/) for data\nstorage, allowing query results to be updated in realtime as they change. GeoFire *selectively loads\nonly the data near certain locations, keeping your applications light and responsive*, even with\nextremely large datasets.\n\nGeoFire is designed as a lightweight add-on to Firebase. To keep things simple, GeoFire stores data\nin its own format and its own location within your Firebase database. This allows your existing data\nformat and Security Rules to remain unchanged while still providing you with an easy solution for geo\nqueries.\n\nA compatible GeoFire client is also available for [Objective-C](https://github.com/firebase/geofire-objc)\nand [Java](https://github.com/firebase/geofire-java).\n\n\n## Table of Contents\n\n * [Downloading GeoFire](#downloading-geofire)\n * [Documentation](#documentation)\n * [Examples](#examples)\n * [Release Notes](https://github.com/firebase/geofire-js/releases)\n * [Migration Guides](#migration-guides)\n * [Contributing](#contributing)\n\n\n## Downloading GeoFire\n\nIn order to use GeoFire in your project, you need to include the following files in your HTML:\n\n```html\n<!-- Firebase -->\n<script src=\"https://www.gstatic.com/firebasejs/3.7.0/firebase.js\"></script>\n\n<!-- GeoFire -->\n<script src=\"https://cdn.firebase.com/libs/geofire/4.1.2/geofire.min.js\"></script>\n```\n\nUse the URL above to download both the minified and non-minified versions of GeoFire from the\nFirebase CDN. You can also download them from the\n[releases page of this GitHub repository](https://github.com/firebase/geofire-js/releases).\n\nYou can also install GeoFire via npm or Bower. If downloading via npm, you will have to install\nFirebase separately (because it is a peer dependency to GeoFire):\n\n```bash\n$ npm install geofire firebase --save\n```\n\nOn Bower, the Firebase dependency will be downloaded automatically:\n\n```bash\n$ bower install geofire --save\n```\n\n## Documentation\n\n* [API Reference](docs/reference.md)\n\n\n## Examples\n\nYou can find a full list of our demos and view the code for each of them in the\n[examples directory](examples/) of this repository. The examples cover some of the common use\ncases for GeoFire and explain how to protect your data using the\n[Firebase Database Security Rules](https://firebase.google.com/docs/database/security/).\n\n### Example Usage\n\nAssume you are building an app to rate bars and you store all information for a bar, e.g. name,\nbusiness hours and price range, at `/bars/<bar-id>`. Later, you want to add the possibility for\nusers to search for bars in their vicinity. This is where GeoFire comes in. You can store the\nlocation for each bar using GeoFire, using the bar IDs as GeoFire keys. GeoFire then allows you to\neasily query which bar IDs (the keys) are nearby. To display any additional information about the\nbars, you can load the information for each bar returned by the query at `/bars/<bar-id>`.\n\n\n## Migration Guides\n\nUsing an older version of GeoFire and want to upgrade to the latest version? Check out our\n[migration guides](docs/migration.md) to find out how!\n\n\n## Contributing\n\nIf you'd like to contribute to GeoFire, please first read through our [contribution\nguidelines](.github/CONTRIBUTING.md). Local setup instructions are available [here](.github/CONTRIBUTING.md#local-setup).\n","readmeFilename":"README.md"}