Skip to content

Commit

Permalink
Change is_burner_domain/1 to is_burner_domain?/1
Browse files Browse the repository at this point in the history
  • Loading branch information
Betree committed Aug 29, 2018
1 parent 1a7de49 commit 46b988b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 7 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.1.0 (2018-08-29)

* Breaking changes
- Change `is_burner_domain/1` to `is_burner_domain?/1`

## 1.0.5 (2018-08-29)

* Enhancements
Expand Down
12 changes: 6 additions & 6 deletions lib/burnex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ defmodule Burnex do
def is_burner?(email) do
case Regex.run(~r/@([^@]+)$/, String.downcase(email)) do
[_ | [domain]] ->
is_burner_domain(domain)
is_burner_domain?(domain)

_ ->
# Bad email format
Expand All @@ -40,15 +40,15 @@ defmodule Burnex do
## Examples
iex> Burnex.is_burner_domain("yopmail.fr")
iex> Burnex.is_burner_domain?("yopmail.fr")
true
iex> Burnex.is_burner_domain("")
iex> Burnex.is_burner_domain?("")
false
iex> Burnex.is_burner_domain("gmail.com")
iex> Burnex.is_burner_domain?("gmail.com")
false
"""
@spec is_burner_domain(binary()) :: boolean()
def is_burner_domain(domain) do
@spec is_burner_domain?(binary()) :: boolean()
def is_burner_domain?(domain) do
Enum.any?(@providers, &Kernel.==(domain, &1))
end

Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ defmodule Burnex.Mixfile do
def project do
[
app: :burnex,
version: "1.0.5",
version: "1.1.0",
elixir: "~> 1.6.6",
description: "Elixir burner email (temporary address) detector",
start_permanent: Mix.env == :prod,
Expand Down

0 comments on commit 46b988b

Please sign in to comment.