crux_gateway v0.1.0 Crux.Gateway.Util View Source

Collection of util functions.

Both functions are identical to the ones in Crux.Structs.Util.

Link to this section Summary

Functions

Atomifies all keys in a passed list or map to avoid the mess of mixed string and atom keys the gateway sends

Converts a string to an atom

Link to this section Functions

Link to this function atomify(map) View Source
atomify(input :: map() | list()) :: map() | list()

Atomifies all keys in a passed list or map to avoid the mess of mixed string and atom keys the gateway sends.

Link to this function string_to_atom(atom) View Source
string_to_atom(string :: String.t() | atom()) :: atom()

Converts a string to an atom.

Returns an already converted atom as is instead of raising an error.