Packages

Library for working with IBAN numbers (parsing, validating and checking and formatting)

Current section

Files

Jump to
iban_ex lib iban_ex serialize.ex
Raw

lib/iban_ex/serialize.ex

defmodule IbanEx.Serialize do
@moduledoc false
alias IbanEx.{Iban, Formatter}
@spec to_string(Iban.t()) :: String.t()
def to_string(iban), do: Formatter.format(iban)
@spec to_map(Iban.t()) :: Map.t()
def to_map(iban), do: Map.from_struct(iban)
end