# domain-from-partial-url

> Turn a URL, no matter how incomplete, into its domain name

Latest version **1.1.0** (published 2018-05-19) · LGPL-3.0+ license · 0 weekly downloads

## Install

```sh
npm install domain-from-partial-url
pnpm add domain-from-partial-url
yarn add domain-from-partial-url
bun add domain-from-partial-url
```

## 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.1.0 |
| Published | 2018-05-19 |
| First published | 2017-08-15 |
| Weekly downloads | 0 |
| License | LGPL-3.0+ |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 49.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | AJ Jordan |
| Maintainers | strugee |
| Keywords | domain, url |

## Links

- npm: https://www.npmjs.com/package/domain-from-partial-url
- Repository: https://github.com/strugee/node-domain-from-partial-url
- Homepage: https://github.com/strugee/node-domain-from-partial-url#readme
- Issues: https://github.com/strugee/node-domain-from-partial-url/issues
- npm.io page: https://npm.io/package/domain-from-partial-url

## Dependencies (1)

- [has-scheme](https://npm.io/package/has-scheme.md) ^1.0.0

## 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.1.0 (latest) — 2018-05-19
- 1.0.0 — 2017-08-15

## README

# `domain-from-partial-url`

[![Build Status](https://travis-ci.org/strugee/node-domain-from-partial-url.svg?branch=master)](http://travis-ci.org/strugee/node-domain-from-partial-url)
[![Coverage Status](https://coveralls.io/repos/github/strugee/node-domain-from-partial-url/badge.svg?branch=master)](https://coveralls.io/github/strugee/node-domain-from-partial-url?branch=master)
[![npm](https://img.shields.io/npm/v/domain-from-partial-url.svg)](https://npmjs.com/package/domain-from-partial-url)
[![Greenkeeper badge](https://badges.greenkeeper.io/strugee/node-domain-from-partial-url.svg)](https://greenkeeper.io/)

Turn a URL, no matter how incomplete, into its domain name

## Installation

    npm install domain-from-partial-url

## Usage

The module exports a single function which will take a vaguely URL-like thing and spit out a domain. For example:

```js
var domainFromPartialUrl = require('domain-from-partial-url');

domainFromPartialUrl('example.com'); // example.com
domainFromPartialUrl('http://example.com'); // example.com
domainFromPartialUrl('example.com/someinfo.html'); // example.com
domainFromPartialUrl('https://example.com/lots/of/stuff/index.html'); // example.com
```

## License

LGPL 3.0+

## Author

AJ Jordan <alex@strugee.net>

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