# url-domain-name

> Get domain name from url

Latest version **1.0.4** (published 2021-08-14) · MIT license · 0 weekly downloads

## Install

```sh
npm install url-domain-name
pnpm add url-domain-name
yarn add url-domain-name
bun add url-domain-name
```

## 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.0.4 |
| Published | 2021-08-14 |
| First published | 2019-08-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Arshad Kazmi |
| Maintainers | arshadkazmi42 |
| Keywords | domain, url, link, domain-name |

## Links

- npm: https://www.npmjs.com/package/url-domain-name
- Repository: https://github.com/arshadkazmi42/url-domain-name
- Homepage: https://github.com/arshadkazmi42/url-domain-name#readme
- Issues: https://github.com/arshadkazmi42/url-domain-name/issues
- npm.io page: https://npm.io/package/url-domain-name

## 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.0.4 (latest) — 2021-08-14
- 1.0.3 — 2020-04-30
- 1.0.2 — 2019-08-24
- 1.0.1 — 2019-08-24
- 1.0.0 — 2019-08-24

## README

# url-domain-name

[![Build](https://img.shields.io/travis/com/arshadkazmi42/url-domain-name.svg)](https://travis-ci.com/arshadkazmi42/url-domain-name/)

Get domain name from url

## Install

```
npm i url-domain-name
```

## Usage

```javascript

const Domain = require('url-domain-name');

domainName = Domain.from('https://github.com/arshadkazmi42');
console.log(domainName);

// Output
// github.com


domainName = Domain.from('https://mail.google.com/arshadkazmi42');
console.log(domainName);

// Output
// mail.google.com

```

## API

- **from(url)**
  - Returns domain name from input url

## Contributing

Interested in contributing to this project?
You can log any issues or suggestion related to this library [here](https://github.com/arshadkazmi42/url-domain-name/issues/new)

Read our contributing [guide](CONTRIBUTING.md) on getting started with contributing to the codebase

## Contributors

Thank you to all the contributors who have helped us in making this project better :raised_hands:

<a href="https://github.com/arshadkazmi42"><img src="https://github.com/arshadkazmi42.png" width="30" /></a>

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