{"_id":"@mapbox/link-to-location","_rev":"324224","name":"@mapbox/link-to-location","description":"Convert a link (HTMLAnchorElement or URL) to an abbreviated Location object.","dist-tags":{"latest":"1.0.0"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"time":{"modified":"2021-06-04T01:55:00.000Z","created":"2017-07-24T21:09:50.472Z","1.0.0":"2017-09-08T22:18:06.325Z","0.1.0":"2017-07-24T21:09:50.472Z"},"users":{},"author":{"name":"Mapbox"},"versions":{"1.0.0":{"name":"@mapbox/link-to-location","version":"1.0.0","description":"Convert a link (HTMLAnchorElement or URL) to an abbreviated Location object.","main":"index.js","jest":{"coverageReporters":["html","text"],"testEnvironment":"node","clearMocks":true,"rootDir":"test","testRegex":".*\\.test\\.js$"},"scripts":{"test":"jest"},"author":{"name":"Mapbox"},"license":"ISC","devDependencies":{"jest":"^20.0.4"},"gitHead":"6f66abba773c59a44898760be06d15386ae20681","_id":"@mapbox/link-to-location@1.0.0","_npmVersion":"5.4.1","_nodeVersion":"6.11.1","_npmUser":{"name":"davidtheclark","email":"david.dave.clark@gmail.com"},"dist":{"shasum":"484a4d922e3e6f7b54fd7964d8035bcb00bbf59a","size":2685,"noattachment":false,"key":"/@mapbox/link-to-location/-/@mapbox/link-to-location-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-to-location/download/@mapbox/link-to-location-1.0.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-to-location-1.0.0.tgz_1504909086256_0.3656789001543075"},"directories":{},"publish_time":1504909086325,"_hasShrinkwrap":false,"_cnpm_publish_time":1504909086325},"0.1.0":{"name":"@mapbox/link-to-location","version":"0.1.0","description":"Convert a link (HTMLAnchorElement or URL) to an abbreviated Location object.","main":"index.js","jest":{"coverageReporters":["html","text"],"testEnvironment":"node","clearMocks":true,"rootDir":"test","testRegex":".*\\.test\\.js$"},"scripts":{"test":"jest"},"author":{"name":"Mapbox"},"license":"ISC","devDependencies":{"jest":"^20.0.4"},"gitHead":"4e5b3baed1df93b81101c5156c2374c7cbb15cbe","_id":"@mapbox/link-to-location@0.1.0","_npmVersion":"5.3.0","_nodeVersion":"7.10.1","_npmUser":{"name":"johnfurrow","email":"hello@johnfurrow.com"},"dist":{"shasum":"b18c5e9c8b48b9821947445f2bf0e5ba147a4a78","size":1822,"noattachment":false,"key":"/@mapbox/link-to-location/-/@mapbox/link-to-location-0.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/@mapbox/link-to-location/download/@mapbox/link-to-location-0.1.0.tgz"},"maintainers":[{"name":"mapbox-machine-user","email":"accounts+npm-mapbox-machine-user@mapbox.com"},{"name":"mapbox-npm","email":"accounts+npmjs@mapbox.com"},{"name":"mapbox-npm-01","email":"accounts+npmjs-01@mapbox.com"},{"name":"mapbox-npm-02","email":"accounts+npmjs-02@mapbox.com"},{"name":"mapbox-npm-03","email":"accounts+npmjs-03@mapbox.com"},{"name":"mapbox-npm-04","email":"accounts+npmjs-04@mapbox.com"},{"name":"mapbox-npm-08","email":"accounts+npmjs-08@mapbox.com"},{"name":"mapbox-npm-09","email":"accounts+npmjs-09@mapbox.com"},{"name":"mapbox-npm-ci","email":"accounts+npmjs-npm-ci@mapbox.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-to-location-0.1.0.tgz_1500930590406_0.4812512749340385"},"directories":{},"publish_time":1500930590472,"_hasShrinkwrap":false,"_cnpm_publish_time":1500930590472}},"readme":"# @mapbox/link-to-location\n\nConvert a link (`HTMLAnchorElement` or URL) to an object with `pathname`, `hash`, and `search` properties.\nUses the browser's native link parsing to avoid unnecessary code.\n\n## Installation\n\n```\nnpm install @mapbox/link-to-location\n```\n\n## API\n\n### linkToLocation\n\n`linkToLocation(input)`\n\nReturns an object with three properties with string values: `pathname`, `hash`, and `search`.\n\n#### input\n\nType: `HTMLAnchorElement` | `string`.\n\nEither the DOM element itself or a URL.\n\n## Example\n\n```js\nconst linkToLocation = require('link-to-location');\n\nlinkToLocation('http://user:pw@foo.bar.baz/qux?quux=grault#fred');\n/*\n  {\n    pathname: 'foo.bar.baz/qux',\n    hash: '#fred',\n    search: '?quux=grault'\n  }\n*/\n```\n","_attachments":{},"license":"ISC"}