# @njc/url

> @njc/url ========

Latest version **2.0.0** (published 2018-12-29) · ISC license · 0 weekly downloads

## Install

```sh
npm install @njc/url
pnpm add @njc/url
yarn add @njc/url
bun add @njc/url
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2018-12-29 |
| First published | 2018-12-29 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 8.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | juancouste. |
| Keywords | url, Url, URL |

## Links

- npm: https://www.npmjs.com/package/@njc/url
- npm.io page: https://npm.io/package/@njc/url

## 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

- 2.0.0 (latest) — 2018-12-29
- 1.0.3 — 2018-12-29
- 1.0.2 — 2018-12-29
- 1.0.1 — 2018-12-29
- 1.0.0 — 2018-12-29

## README

@njc/url
========

Simple url parser following RFC 3986, section 3 (2005),
<img src="https://upload.wikimedia.org/wikipedia/commons/9/96/URI_syntax_diagram.png">
Does not depend on other libraries.

Usage
=====

```typescript
interface Url {

    readonly schema: string;
    readonly userinfo: string;
    readonly host: string;
    readonly port: number;
    readonly path: string;
    readonly query: string;
    readonly fragment: string;

}

/* Uses the base authority and schema with the specified path */
function UrlFrom(base: Url, path: string) : Url
function ParseUrl(url: string): Url
function UrlToString(url: Url): string
```

Future versions
===============
<ul>
<li>Error checking on the provided string<li>
<li>Query as a list and userinfo split<li>
</ul>

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