-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6493150
commit 9d44cad
Showing
29 changed files
with
2,063 additions
and
1,259 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[ | ||
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"], | ||
line_length: 160 | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
defmodule ExPhoneNumber do | ||
def format(%ExPhoneNumber.Model.PhoneNumber{} = phone_number, phone_number_format) when is_atom(phone_number_format), do: ExPhoneNumber.Formatting.format(phone_number, phone_number_format) | ||
def format(%ExPhoneNumber.Model.PhoneNumber{} = phone_number, phone_number_format) | ||
when is_atom(phone_number_format), | ||
do: ExPhoneNumber.Formatting.format(phone_number, phone_number_format) | ||
|
||
def get_number_type(%ExPhoneNumber.Model.PhoneNumber{} = phone_number), do: ExPhoneNumber.Validation.get_number_type(phone_number) | ||
def get_number_type(%ExPhoneNumber.Model.PhoneNumber{} = phone_number), | ||
do: ExPhoneNumber.Validation.get_number_type(phone_number) | ||
|
||
def is_possible_number?(%ExPhoneNumber.Model.PhoneNumber{} = phone_number), do: ExPhoneNumber.Validation.is_possible_number?(phone_number) | ||
def is_possible_number?(%ExPhoneNumber.Model.PhoneNumber{} = phone_number), | ||
do: ExPhoneNumber.Validation.is_possible_number?(phone_number) | ||
|
||
def is_possible_number?(number, region_code) when is_binary(number), do: ExPhoneNumber.Parsing.is_possible_number?(number, region_code) | ||
def is_possible_number?(number, region_code) when is_binary(number), | ||
do: ExPhoneNumber.Parsing.is_possible_number?(number, region_code) | ||
|
||
def is_valid_number?(%ExPhoneNumber.Model.PhoneNumber{} = phone_number), do: ExPhoneNumber.Validation.is_valid_number?(phone_number) | ||
def is_valid_number?(%ExPhoneNumber.Model.PhoneNumber{} = phone_number), | ||
do: ExPhoneNumber.Validation.is_valid_number?(phone_number) | ||
|
||
def parse(number_to_parse, default_region), do: ExPhoneNumber.Parsing.parse(number_to_parse, default_region) | ||
def parse(number_to_parse, default_region), | ||
do: ExPhoneNumber.Parsing.parse(number_to_parse, default_region) | ||
end |
Oops, something went wrong.