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
- Host: GitHub
- URL: https://github.com/pindlebot/normalize-domain
- Owner: pindlebot
- Created: 2018-12-29T00:31:49.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-12-29T01:08:10.000Z (over 7 years ago)
- Last Synced: 2025-02-11T04:16:20.069Z (over 1 year ago)
- Language: JavaScript
- Size: 1000 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
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
```