LivePhone.Country.from_iso
You're seeing just the function
from_iso
, go back to LivePhone.Country module for more information.
Specs
Converts the given iso_country
tuple into a LivePhone.Country
struct.
Examples
iex> ISO.countries() |> Map.to_list() |> Enum.find(fn {cc, _} -> cc == "SL" end) |> LivePhone.Country.from_iso()
%LivePhone.Country{
preferred: false,
region_code: "232",
flag_emoji: "πΈπ±",
code: "SL",
name: "Sierra Leone"
}
iex> LivePhone.Country.from_iso({"US", %{"name" => "United States"}})
%LivePhone.Country{
preferred: false,
region_code: "1",
flag_emoji: "πΊπΈ",
code: "US",
name: "United States"
}