Created
March 26, 2020 17:33
-
-
Save bultas/dc0364b50a85affd607699b54e03f0e4 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
defp atomize_map(%{} = stringy_map) do | |
stringy_map | |
|> Map.new(fn {k, v} -> {String.to_atom(k), v} end) | |
end | |
defp atomize_map(_) do | |
%{} | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment