Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/zkochan/true-domain

Returns the active domain name of the current page excluding subdomains.
https://github.com/zkochan/true-domain

Last synced: 10 days ago
JSON representation

Returns the active domain name of the current page excluding subdomains.

Awesome Lists containing this project

README

        

# true-domain

Returns the active domain name of the current page excluding subdomains.

## Installation

```
npm install --save true-domain
```

## Usage

```js
var trueDomain = require('true-domain');

console.log(trueDomain);
```

## Idea source

Inspired by [this][blog-post] blog post by Ross Scrivener.

## License

MIT © [Zoltan Kochan](https://www.kochan.io)

[blog-post]: http://rossscrivener.co.uk/blog/javascript-get-domain-exclude-subdomain