{"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":{"integrity":"sha512-wZnrwQQkGJHSwW9GLBpSi3kpGi3YQNH9+aZtSFzcL+OUh3gmu+7uL8A9wLGWKKUyWMZJRLaZ4TDhunoEcO7wIg==","shasum":"b18c5e9c8b48b9821947445f2bf0e5ba147a4a78","tarball":"http://registry-npm.ywwl.com/@mapbox/link-to-location/download/@mapbox/link-to-location-0.1.0.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIA/wOKay3CEik9pHFXaXxA599ncYU/hsObqvabDJbExbAiEA8dseEdZRYNVJzO1c6X4g0uOfksh3WknWil9BIbPeYm0="}],"size":1822,"noattachment":false,"key":"/@mapbox/link-to-location/-/@mapbox/link-to-location-0.1.0.tgz"},"maintainers":[{"name":"johnfurrow","email":"hello@johnfurrow.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/link-to-location-0.1.0.tgz_1500930590406_0.4812512749340385"},"directories":{},"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","publish_time":1500930590472,"_cnpm_publish_time":1500930590472,"dist-tags":{"latest":"1.0.0"}}