Packages

DatoCMS client with helpers for static site generators

Current section

Files

Jump to
datocms_client lib atom_key.ex
Raw

lib/atom_key.ex

defmodule AtomKey do
def to_atom(a) when is_atom(a) do
a
end
def to_atom(n) when is_integer(n) do
:"#{n}"
end
def to_atom(s) when is_binary(s) do
String.to_atom(s)
end
end