# link-to-location

> Convert a link (HTMLAnchorElement or URL) to an abbreviated Location object.

Latest version **0.1.0** (published 2017-07-24) · ISC license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install link-to-location
pnpm add link-to-location
yarn add link-to-location
bun add link-to-location
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.1.0 |
| Published | 2017-07-24 |
| First published | 2017-07-24 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Mapbox |
| Maintainers | johnfurrow |

## Links

- npm: https://www.npmjs.com/package/link-to-location
- npm.io page: https://npm.io/package/link-to-location

## Recent versions

- 0.1.0 (latest) — 2017-07-24

## README

# link-to-location

Convert a link (`HTMLAnchorElement` or URL) to an abbreviated Location object.

### Usage
This module provides a single function which accepts either an `HTMLAnchorElement` or URL string and returns an object with three properties: `pathname`, `hash`, and `seach`.

#### Example Usage:
```js
const linkToLocation = require('link-to-location');

linkToLocation('http://user:pw@foo.bar.baz/qux?quux=grault#fred');
/*
  {
    pathname: 'foo.bar.baz/qux',
    hash: '#fred',
    search: '?quux=grault'
  }
*/
```

---
_Source: https://npm.io/package/link-to-location · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
