{"id":26711622,"url":"https://github.com/stackblogger/distance-finder-by-geo","last_synced_at":"2025-08-26T07:04:05.041Z","repository":{"id":57213025,"uuid":"223742654","full_name":"stackblogger/distance-finder-by-geo","owner":"stackblogger","description":"This plugin is used to fetch customers by Latitude and Longitude within a range provided by user at the time of plugin call.","archived":false,"fork":false,"pushed_at":"2019-11-24T13:21:35.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-22T09:28:09.666Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stackblogger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-24T12:44:49.000Z","updated_at":"2022-08-29T16:55:36.000Z","dependencies_parsed_at":"2022-08-24T21:01:30.527Z","dependency_job_id":null,"html_url":"https://github.com/stackblogger/distance-finder-by-geo","commit_stats":null,"previous_names":["jimcute/distance-finder-by-geo"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stackblogger/distance-finder-by-geo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Fdistance-finder-by-geo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Fdistance-finder-by-geo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Fdistance-finder-by-geo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Fdistance-finder-by-geo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stackblogger","download_url":"https://codeload.github.com/stackblogger/distance-finder-by-geo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stackblogger%2Fdistance-finder-by-geo/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":272186219,"owners_count":24888333,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-26T02:00:07.904Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-27T10:29:48.990Z","updated_at":"2025-08-26T07:04:05.021Z","avatar_url":"https://github.com/stackblogger.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DistanceFinderByGeo\n\n\nLibrary to find data which falls under a given radius (km). The library uses Geopoint calculations using Radians to get distance between two coordinates and then find out which data falls under the given radius.\n\n## Install\n\n```sh\nnpm install distance-finder-by-geo\n```\n\n## Usage\n\n\n```js\nrequire('distance-finder-by-geo')\n```\n\n#### Download Sample Customers.txt file for testing\n\n\u003ca href=\"https://raw.githubusercontent.com/jimcute/distance-finder-by-geo/master/Customers.txt\"\u003eClick to Download the file\u003c/a\u003e\n\n## Functions\n\nGet All the Customers within Radius Range provided at the time of function call.\n\n### `getAllCustomersWithinRange(point, jsonFilePath, radius, orderBy = '')`\n\n#### Paramaters:\n- point: The base Geopoint from where we need to find distance of other Coordinates\n- jsonFilePath: Customers.txt file path which has the Coordinates data\n- radius: The distance radius\n- orderBy: (Optional) Pass the field name exist in Customers.txt file by which you want the Ascending Ordering\n\n\n```js\n// Working code sample\nrequire('distance-finder-by-geo')\n  .getAllCustomersWithinRange({ lat: 53.339428, lng: -6.257664 }, __dirname + '/Customers.txt', 100, 'user_id')\n  .then(result =\u003e {\n    console.log(result);\n  }).catch(ex =\u003e {\n    console.log(ex);\n  })\n```\n\nGet all the data in Success Callback and Exception in Error Callback.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackblogger%2Fdistance-finder-by-geo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstackblogger%2Fdistance-finder-by-geo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstackblogger%2Fdistance-finder-by-geo/lists"}