{"id":20373064,"url":"https://github.com/gluons/wheres-here","last_synced_at":"2025-07-31T12:10:17.022Z","repository":{"id":57397714,"uuid":"78734528","full_name":"gluons/wheres-here","owner":"gluons","description":"🌏 Promisified Geolocation","archived":false,"fork":false,"pushed_at":"2020-07-20T09:13:25.000Z","size":362,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T04:07:56.389Z","etag":null,"topics":["geolocation","javascript","promise"],"latest_commit_sha":null,"homepage":"","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/gluons.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}},"created_at":"2017-01-12T10:35:57.000Z","updated_at":"2020-07-20T09:13:27.000Z","dependencies_parsed_at":"2022-08-31T15:20:18.874Z","dependency_job_id":null,"html_url":"https://github.com/gluons/wheres-here","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fwheres-here","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fwheres-here/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fwheres-here/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gluons%2Fwheres-here/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gluons","download_url":"https://codeload.github.com/gluons/wheres-here/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241921836,"owners_count":20042763,"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":["geolocation","javascript","promise"],"created_at":"2024-11-15T01:16:21.943Z","updated_at":"2025-03-04T20:43:55.676Z","avatar_url":"https://github.com/gluons.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Where is here?\n[![license](https://img.shields.io/github/license/gluons/wheres-here.svg?style=flat-square)](https://github.com/gluons/wheres-here/blob/master/LICENSE)\n[![npm](https://img.shields.io/npm/v/wheres-here.svg?style=flat-square)](https://www.npmjs.com/package/wheres-here)\n[![Bower](https://img.shields.io/bower/v/wheres-here.svg?style=flat-square)](https://github.com/gluons/wheres-here)\n[![Travis](https://img.shields.io/travis/gluons/wheres-here.svg?style=flat-square)](https://travis-ci.org/gluons/wheres-here)\n[![ESLint Gluons](https://img.shields.io/badge/code%20style-gluons-9C27B0.svg?style=flat-square)](https://github.com/gluons/eslint-config-gluons)\n\n🌏 Promisified Geolocation\n\nGet current geolocation by [Geolocation API](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation) as [Promise](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n\n## Installation\n**Via [Bower](https://bower.io/):**\n```\nbower install wheres-here\n```\n\n**Via [NPM](https://www.npmjs.com/):**\n\n[![NPM](https://nodei.co/npm/wheres-here.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://www.npmjs.com/package/wheres-here)\n\n```\nnpm install wheres-here\n```\n**Or [Yarn](https://yarnpkg.com/):**\n```\nyarn add wheres-here\n```\n\n## Usage\n\nYou can bundle `wheres-here` with [webpack](https://github.com/webpack/webpack) for using in browser.\n\n```javascript\nconst here = require('wheres-here');\n\nhere().then(position =\u003e {\n\tlet lat = position.coords.latitude;\n\tlet lng = position.coords.longitude;\n\tconsole.log(`I'm at ${lat}, ${lng}.`); // Somewhere on the Earth.\n}).catch(err =\u003e {\n\tconsole.error(err); // Oh! It's error.\n});\n```\n\nOr directly import to your webpage.\n\n\u003e You can use [unpkg CDN](https://unpkg.com):\n```\nhttps://unpkg.com/wheres-here\n```\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n\t\u003cmeta charset=\"UTF-8\"\u003e\n\t\u003ctitle\u003eDocument\u003c/title\u003e\n\t\u003cscript src=\"https://unpkg.com/wheres-here\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n\t\u003cscript\u003e\n\t\there().then(p =\u003e {\n\t\t\tconsole.log(p);\n\t\t}).catch(e =\u003e {\n\t\t\tconsole.error(e);\n\t\t});\n\t\u003c/script\u003e\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n## API\n\n### here([options])\n#### options\nType: [`PositionOptions`](https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions)  \nReturn: [`Promise`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise)\n\nOptions for [`Geolocation.getCurrentPosition()`](https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluons%2Fwheres-here","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgluons%2Fwheres-here","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgluons%2Fwheres-here/lists"}