Cldr.Map.floatize_keys
You're seeing just the function
floatize_keys
, go back to Cldr.Map module for more information.
Transforms a map
's String.t
keys to Float.t
values.
Arguments
map
is anymap/0
options
is a keyword list of options passed todeep_map/3
The map key is converted to a float
from
a String.t
only when the key is comprised of
a valid float form.
Keys which cannot be converted to a float
are returned unchanged.
Examples
iex> Cldr.Map.floatize_keys %{a: %{"1.0" => "value"}}
%{a: %{1.0 => "value"}}
iex> Cldr.Map.floatize_keys %{a: %{"1" => "value"}}
%{a: %{1.0 => "value"}}