An open API service indexing awesome lists of open source software.

https://github.com/pindlebot/normalize-domain

Normalize url to domain
https://github.com/pindlebot/normalize-domain

Last synced: 10 months ago
JSON representation

Normalize url to domain

Awesome Lists containing this project

README

          

# normalize-domain

Given a url, returns the fully qualified domain name.

## Installation

```bash
npm i normalize-domain --save
```

## Usage

```js
const normalize = require('normalize-domain')

normalize('https://www.google.com')
// => google.com

normalize('www.google.com')
// => google.com

normalize('https://firebase.google.com/')
// => firebase.google.com
```