{"_id":"@bouzuya/get-current-position","_rev":"4-6e8ec0af426259fbe758fb8156e7f237","name":"@bouzuya/get-current-position","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@bouzuya/get-current-position","description":"`navigator.geolocation.getCurrentPosition` wrapper","version":"0.1.0","author":{"name":"bouzuya","email":"m@bouzuya.net","url":"http://bouzuya.net"},"babel":{"presets":[["env",{"targets":{"node":"4"}}],"power-assert"]},"bugs":{"url":"https://github.com/bouzuya/get-current-position/issues"},"devDependencies":{"@types/node":"^8.10.0","@types/power-assert":"^1.4.0","@types/proxyquire":"^1.3.0","@types/sinon":"^4.3.0","babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-power-assert":"^2.0.0","beater":"^5.0.0","beater-helpers":"^0.2.0","cpx":"^1.5.0","npm-run-all":"^4.1.0","power-assert":"^1.4.0","proxyquire":"^1.8.0","rimraf":"^2.6.0","sinon":"^4.4.0","tap-dot-b":"^0.1.0","tslint":"^5.9.0","typescript":"^2.7.0","watch":"^1.0.0"},"files":["lib"],"homepage":"https://github.com/bouzuya/get-current-position#readme","keywords":[],"license":"MIT","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/bouzuya/get-current-position.git"},"scripts":{"build":"npm-run-all -s build:lint build:es2015 build:es5 build:lib","build:es2015":"tsc","build:es5":"babel -q -d .tmp/es5/ .tmp/es2015/","build:lib":"cpx '.tmp/es2015/src/**/*.{js,ts}' lib/","build:lint":"tslint --project tsconfig.json","clean":"rimraf .tmp lib","prepare":"npm-run-all -s clean build","test":"node .tmp/es5/test/index.js | tap-dot-b","watch":"npm-run-all -p 'watch:*'","watch:es2015":"npm run build:es2015 -- --sourceMap --watch","watch:es5":"npm run build:es5 -- --watch","watch:test":"watch 'npm run test' .tmp/es5/"},"gitHead":"cc1930cf3deea38a897fd9c7ad49eebb5ea17d79","_id":"@bouzuya/get-current-position@0.1.0","_npmVersion":"5.7.1","_nodeVersion":"8.9.3","_npmUser":{"name":"bouzuya","email":"m@bouzuya.net"},"dist":{"integrity":"sha512-/FcAOqT83ArlrMqr3taXwNcJ9QTUR6vqZwwd9WJ3wI877LsJ5pgGBln2U5wj0zJZS4pI2xn5nlcWxiul/UMWHQ==","shasum":"0a3cf81a2a6d449f4e2c0698b126b1f108342845","tarball":"https://registry.npmjs.org/@bouzuya/get-current-position/-/get-current-position-0.1.0.tgz","fileCount":17,"unpackedSize":14861,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCUYL2dwizAw2H+WD6oJjGHNXYDTQV4uK3fyeOJR9Kf+QIhAM2F3KMCvB+u643nvuxs1p53uy/63WeIiH4QeOWcJ19J"}]},"maintainers":[{"name":"bouzuya","email":"m@bouzuya.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-current-position_0.1.0_1522338602136_0.3713935277688689"},"_hasShrinkwrap":false},"0.1.1":{"name":"@bouzuya/get-current-position","description":"`navigator.geolocation.getCurrentPosition` wrapper","version":"0.1.1","author":{"name":"bouzuya","email":"m@bouzuya.net","url":"http://bouzuya.net"},"babel":{"presets":[["env",{"targets":{"node":"6"}}],"power-assert"]},"bugs":{"url":"https://github.com/bouzuya/get-current-position/issues"},"devDependencies":{"@types/node":"^8.10.0","@types/power-assert":"^1.4.0","@types/proxyquire":"^1.3.0","@types/sinon":"^4.3.0","babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-power-assert":"^2.0.0","beater":"^5.0.0","beater-helpers":"^0.2.0","cpx":"^1.5.0","npm-run-all":"^4.1.0","power-assert":"^1.4.0","proxyquire":"^1.8.0","rimraf":"^2.6.0","sinon":"^4.4.0","tap-dot-b":"^0.1.0","tslint":"^5.9.0","typescript":"^2.7.0","watch":"^1.0.0"},"files":["lib"],"homepage":"https://github.com/bouzuya/get-current-position#readme","keywords":[],"license":"MIT","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/bouzuya/get-current-position.git"},"scripts":{"build":"npm-run-all -s build:lint build:es2015 build:es5 build:lib","build:es2015":"tsc","build:es5":"babel -q -d .tmp/es5/ .tmp/es2015/","build:lib":"cpx '.tmp/es2015/src/**/*.{js,ts}' lib/","build:lint":"tslint --project tsconfig.json","clean":"rimraf .tmp lib","prepare":"npm-run-all -s clean build","test":"node .tmp/es5/test/index.js | tap-dot-b","watch":"npm-run-all -p 'watch:*'","watch:es2015":"npm run build:es2015 -- --sourceMap --watch","watch:es5":"npm run build:es5 -- --watch","watch:test":"watch 'npm run test' .tmp/es5/"},"gitHead":"d783049d05f186b5486849ba4ea228e98488287b","_id":"@bouzuya/get-current-position@0.1.1","_npmVersion":"5.7.1","_nodeVersion":"8.9.3","_npmUser":{"name":"bouzuya","email":"m@bouzuya.net"},"dist":{"integrity":"sha512-GCJdf69bdMJ+Rxc0G4Ca8F3OCiwk6hzHA2HNsmXDimJuNnqRYRV1gae1zEls5zW4D0wTwVq2F3icgk1v0YhjEA==","shasum":"bd2d0f92c7df06bcf167a8ccde7ebc0d79762103","tarball":"https://registry.npmjs.org/@bouzuya/get-current-position/-/get-current-position-0.1.1.tgz","fileCount":17,"unpackedSize":14869,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDd59qGIAUa5/CC47V8/w9QmzE0IZX9VCX80tetz4p1FAIhAMiUquuzIoPkWpE7Z/eBkv7Tw8zwc1/EELLeBMhZp4wC"}]},"maintainers":[{"name":"bouzuya","email":"m@bouzuya.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-current-position_0.1.1_1522420671622_0.3985530436217779"},"_hasShrinkwrap":false},"0.1.2":{"name":"@bouzuya/get-current-position","description":"`navigator.geolocation.getCurrentPosition` wrapper","version":"0.1.2","author":{"name":"bouzuya","email":"m@bouzuya.net","url":"http://bouzuya.net"},"babel":{"presets":[["env",{"targets":{"node":"6"}}],"power-assert"]},"bugs":{"url":"https://github.com/bouzuya/get-current-position/issues"},"devDependencies":{"@types/node":"^8.10.0","@types/power-assert":"^1.4.0","@types/proxyquire":"^1.3.0","@types/sinon":"^4.3.0","babel-cli":"^6.26.0","babel-preset-env":"^1.6.1","babel-preset-power-assert":"^2.0.0","beater":"^5.0.0","beater-helpers":"^0.2.0","coveralls":"^3.0.0","npm-run-all":"^4.1.0","nyc":"^11.6.0","power-assert":"^1.4.0","proxyquire":"^1.8.0","rimraf":"^2.6.0","sinon":"^4.4.0","tap-dot-b":"^0.1.0","tslint":"^5.9.0","typescript":"^2.7.0","watch":"^1.0.0"},"files":["lib"],"homepage":"https://github.com/bouzuya/get-current-position#readme","keywords":[],"license":"MIT","main":"lib/index.js","repository":{"type":"git","url":"git+https://github.com/bouzuya/get-current-position.git"},"scripts":{"build":"npm-run-all -s build:lint build:es2015 build:es5 build:lib","build:es2015":"tsc","build:es5":"babel --out-dir .tmp/es5/ --source-maps inline --quiet .tmp/es2015/","build:lib":"babel --copy-files --no-comments --out-dir lib/ --quiet .tmp/es2015/src/","build:lint":"tslint --project tsconfig.json","clean":"rimraf .nyc_output .tmp coverage lib","coveralls":"nyc report --reporter text-lcov | coveralls","prepare":"npm-run-all -s clean build","test":"nyc --reporter lcov node .tmp/es5/test/index.js | tap-dot-b && nyc report","watch":"npm-run-all -p 'watch:*'","watch:es2015":"npm run build:es2015 -- --watch","watch:es5":"npm run build:es5 -- --watch","watch:test":"watch 'npm run test' .tmp/es5/ --wait 2"},"gitHead":"ef6b9762bb0ba4c334e0a0c403d71538d9ebe9d7","_id":"@bouzuya/get-current-position@0.1.2","_npmVersion":"5.7.1","_nodeVersion":"8.9.3","_npmUser":{"name":"bouzuya","email":"m@bouzuya.net"},"dist":{"integrity":"sha512-mEcCdX2OdChygoM/ntu7JpVIDpC1ClBDeU9Z2i9vQueqFGOzWvomGDnBGL6b1erUHfI3b/lYrYZ4y39sVYdFNQ==","shasum":"8a2ee63443b4fc00c49ccbd9c035bc702a0ddd7e","tarball":"https://registry.npmjs.org/@bouzuya/get-current-position/-/get-current-position-0.1.2.tgz","fileCount":17,"unpackedSize":15902,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCep17de21vZowm5KWIRIHLRJFoHkB/fe7WyJrcH5VZvgIhALVIQAqHJgNj4sxzaG1xccTXKE8Lovkb014vMx11wAA+"}]},"maintainers":[{"name":"bouzuya","email":"m@bouzuya.net"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/get-current-position_0.1.2_1522476464876_0.5326399727420863"},"_hasShrinkwrap":false}},"time":{"created":"2018-03-29T15:50:02.135Z","0.1.0":"2018-03-29T15:50:02.238Z","modified":"2022-04-04T20:16:21.977Z","0.1.1":"2018-03-30T14:37:51.759Z","0.1.2":"2018-03-31T06:07:44.997Z"},"maintainers":[{"name":"bouzuya","email":"m@bouzuya.net"}],"description":"`navigator.geolocation.getCurrentPosition` wrapper","homepage":"https://github.com/bouzuya/get-current-position#readme","keywords":[],"repository":{"type":"git","url":"git+https://github.com/bouzuya/get-current-position.git"},"author":{"name":"bouzuya","email":"m@bouzuya.net","url":"http://bouzuya.net"},"bugs":{"url":"https://github.com/bouzuya/get-current-position/issues"},"license":"MIT","readme":"# get-current-position\n\n`navigator.geolocation.getCurrentPosition` wrapper.\n\n## Installation\n\n```sh\n$ npm install @bouzuya/get-current-position\n```\n\n## Usage\n\n```typescript\nimport { getCurrentPosition } from '@bouzuya/get-current-position';\n\nconst main = async () => {\n  const position1 = await getCurrentPosition({\n    enableHighAccuracy: true,\n    timeout: 5000,\n    maximumAge: 0,\n  });\n  // {\n  //   coords: {\n  //     accuracy: 30,\n  //     altitude: 0,\n  //     altitudeAccuracy: 0,\n  //     heading: NaN,\n  //     latitude: 34.694372,\n  //     longitude: 135.201863,\n  //     speed: NaN\n  //   },\n  //   timestamp: 1522119771324\n  // }\n  console.log(position1);\n\n  // retry & accuracy options\n  const position2 = await getCurrentPosition({\n    ...{\n      enableHighAccuracy: false,\n      timeout: 100,\n      maximumAge: Infinity\n    },\n    accuracyOptions: {\n      maximumAccuracy: 500,\n      minimumTimestamp: new Date().getTime() - 300000\n    },\n    maximumRetryCount: 3,\n    retryArguments: [\n      {\n        enableHighAccuracy: true,\n        timeout: 10000,\n        maximumAge: 0\n      },\n      {\n        enableHighAccuracy: true,\n        timeout: 5000,\n        maximumAge: 0\n      }\n      {\n        enableHighAccuracy: true,\n        timeout: 5000,\n        maximumAge: 0\n      }\n    ]\n  });\n  console.log(position2);\n};\n\nmain();\n```\n\n## Badges\n\n[![npm version][npm-badge-url]][npm-url]\n[![Travis CI][travisci-badge-url]][travisci-url]\n[![Coveralls][coveralls-badge-url]][coveralls-url]\n\n[npm-badge-url]: https://img.shields.io/npm/v/@bouzuya/get-current-position.svg\n[npm-url]: https://www.npmjs.com/package/@bouzuya/get-current-position\n[travisci-badge-url]: https://img.shields.io/travis/bouzuya/get-current-position.svg\n[travisci-url]: https://travis-ci.org/bouzuya/get-current-position\n[coveralls-url]: https://coveralls.io/github/bouzuya/get-current-position\n[coveralls-badge-url]: https://img.shields.io/coveralls/github/bouzuya/get-current-position.svg\n\n## License\n\n[MIT](LICENSE)\n\n## Author\n\n[bouzuya][user] &lt;[m@bouzuya.net][email]&gt; ([http://bouzuya.net][url])\n\n[user]: https://github.com/bouzuya\n[email]: mailto:m@bouzuya.net\n[url]: http://bouzuya.net\n","readmeFilename":"README.md"}