# Domainatrex
### Domainatrex is a TLD parsing library for Elixir, using the Public Suffix list.
[](https://travis-ci.org/Zensavona/domainatrex) [](http://inch-ci.org/github/zensavona/domainatrex) [](https://coveralls.io/github/Zensavona/domainatrex?branch=master) [](https://beta.hexfaktor.org/github/Zensavona/domainatrex) [](https://hex.pm/packages/domainatrex) [](https://hex.pm/packages/domainatrex) [](http://opensource.org/licenses/MIT)
### [Read the docs](https://hexdocs.pm/domainatrex)
## Installation
Add the following to your `mix.exs`
```
defp deps do
[{:domainatrex, "~> 1.0"}]
```
## Usage
`Domainatrex` should be able to handle all valid hostnames, it uses the [Public Suffix List](https://publicsuffix.org/list/) and is heavily inspired by the fantastic [Domainatrix](https://github.com/pauldix/domainatrix) library for Ruby
```
iex> Domainatrex.parse("someone.com")
%{domain: "someone", subdomain: "", tld: "com"}
iex> Domainatrex.parse("blog.someone.id.au")
%{domain: "someone", subdomain: "blog", tld: "id.au"}
```
## Changelog