{"id":20238851,"url":"https://github.com/joelcolucci/geolocation-distance-between","last_synced_at":"2026-05-12T09:38:50.692Z","repository":{"id":86887285,"uuid":"144910295","full_name":"joelcolucci/geolocation-distance-between","owner":"joelcolucci","description":"ES6 module to calculate distance between coordinates","archived":false,"fork":false,"pushed_at":"2018-08-21T12:03:00.000Z","size":40,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-14T10:15:37.184Z","etag":null,"topics":["coordinates","distance","geolocation","haversine","latitude","longitude"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/joelcolucci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-08-15T22:41:06.000Z","updated_at":"2021-11-13T15:34:46.000Z","dependencies_parsed_at":"2023-07-11T06:17:45.576Z","dependency_job_id":null,"html_url":"https://github.com/joelcolucci/geolocation-distance-between","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"8f5437c1a87176891febbee4dc06e51af73c7f8d"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelcolucci%2Fgeolocation-distance-between","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelcolucci%2Fgeolocation-distance-between/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelcolucci%2Fgeolocation-distance-between/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joelcolucci%2Fgeolocation-distance-between/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joelcolucci","download_url":"https://codeload.github.com/joelcolucci/geolocation-distance-between/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241685822,"owners_count":20003103,"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","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":["coordinates","distance","geolocation","haversine","latitude","longitude"],"created_at":"2024-11-14T08:35:55.412Z","updated_at":"2026-05-12T09:38:45.672Z","avatar_url":"https://github.com/joelcolucci.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# geolocation-distance-between [![NPM version](https://img.shields.io/npm/v/geolocation-distance-between.svg)](https://www.npmjs.com/package/geolocation-distance-between)\n\u003e ES6 module to calculate distance between coordinates\n\n## Installation\n```\n# NPM\nnpm install geolocation-distance-between --save\n\n# Yarn\nyarn add geolocation-distance-between\n```\n\n## Getting Started\n```javascript\nimport { getDistanceBetween } from 'geolocation-distance-between';\n\nlet coordinateOne = {latitude: 41.3543, longitude: 71.9665};\nlet coordianteTwo = {latitude: 41.3890, longitude: 70.5134};\n\nlet distanceBetween = getDistanceBetween(coordinateOne, coordinateTwo);\n\nconsole.log(distanceBetween); // 121.31393500601737 KM\n```\n\n## Documentation\n### `getDistanceBetween(coordinateOne, coordinateTwo)`\n\n#### Arguments\n| Argument | Type |\n| -------- | ---- |\n| coordinateOne | Object containing latitude and longitude key/value pairs |\n| coordinateTwo | Object containing latitude and longitude key/value pairs |\n\n** Latitude/longitude values should be degrees in decimal form\n\n#### Returns\nDistance between two coordinates in kilometers (KM). Distance is calculated via the Haversine formula.\n\n## Credit(s)\nhttps://www.movable-type.co.uk/scripts/latlong.html\n\nhttps://en.wikipedia.org/wiki/Haversine_formula\n\n## License\nMIT License Copyright (c) 2018 Joel Colucci","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelcolucci%2Fgeolocation-distance-between","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoelcolucci%2Fgeolocation-distance-between","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoelcolucci%2Fgeolocation-distance-between/lists"}