# endpointlocation

> A URL manipulation utility similar to the familiar `Location` interface (in `window`).

Latest version **1.2.0** (published 2019-10-25) · GPL-3.0 license · 0 weekly downloads

## Install

```sh
npm install endpointlocation
pnpm add endpointlocation
yarn add endpointlocation
bun add endpointlocation
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2019-10-25 |
| First published | 2019-02-19 |
| Weekly downloads | 0 |
| License | GPL-3.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 49.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mark M. Young |
| Maintainers | markmyoung |
| Keywords | endpoint, URL, web service, window.location |

## Links

- npm: https://www.npmjs.com/package/endpointlocation
- Repository: https://github.com/MarkMYoung/EndpointLocation
- Issues: https://github.com/MarkMYoung/EndpointLocation/issues
- npm.io page: https://npm.io/package/endpointlocation

## Alternatives

- [base64url](https://npm.io/package/base64url.md) — 6.1M weekly downloads
- [get-installed-path](https://npm.io/package/get-installed-path.md) — 502.9K weekly downloads
- [@uppy/url](https://npm.io/package/@uppy/url.md) — 185.8K weekly downloads
- [@d3fc/d3fc-shape](https://npm.io/package/@d3fc/d3fc-shape.md) — 16.2K weekly downloads
- [localizer](https://npm.io/package/localizer.md) — 226 weekly downloads

## Recent versions

- 1.2.0 (latest) — 2019-10-25
- 1.1.0 — 2019-02-21
- 1.0.2 — 2019-02-19
- 1.0.1 — 2019-02-19
- 1.0.0 — 2019-02-19

## README

# EndpointLocation
A URL manipulation utility similar to the familiar `Location` interface (in `window`).  The main difference is that `Location`'s API <sup id="browser_location-ref_1">[1](#browser_location)</sup> only accepts a URL string (and another `Location` object via `toString()`), but `EndpointLocation`'s API allows all that plus "construction by configuration" and empty construction for convenience.

```JavaScript
let clientEndpoint = new EndpointLocation(
{
	'hostname':'example.com',
	'pathname':'/'.concat( ['path', 'to', 'endpoint'].join( '/' )),
	'params':{'hash':'of', 'url':'parameters'},
	'protocol':'https:',
});
request.get(
	{
		'headers':
		{
			'Accept':'application/json',
			'User-Agent':'request',
		},
		// The convenience of `EndpointLocation`.
		'url':clientEndpoint.href,
		// "https://example.com/path/to/endpoint?hash=of&url=parameters"
	},
	function response_handler( error, httpResponse, responseText )
	{}
);
```
<b id="browser_location">1.</b> https://www.w3.org/TR/html50/browsers.html#the-location-interface

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