Packages

A collection of helpers to operate on nested maps. See README for the complete list of helpers. The test suite is also helpful.

Current section

Files

Jump to
digger lib impl stringifier float.ex
Raw

lib/impl/stringifier/float.ex

defimpl Digger.Stringifier, for: Float do
alias Digger.Opts.Stringifier, as: Opts
def stringify(float, opts) do
to_string(float, Opts.set_options(opts))
end
defp to_string(float, type: :key, key_transform: :stringify, value_transform: _),
do: float |> Float.to_string()
defp to_string(float, type: :value, key_transform: _, value_transform: :stringify),
do: float |> Float.to_string()
defp to_string(float, _), do: float
end