View Source Kadena.Utils.MapCase (Kadena v0.19.0)

Utils.MapCase functions to convert the keys of a map to camel or snake case

Link to this section Summary

Link to this section Types

@type key() :: atom() | String.t()
@type opt() :: :to_camel | :to_snake
@type string_value() :: String.t()
@type valid_format() :: string_value() | map()
@type valid_map() :: {:ok, map()}
@type value() :: any()
@type words() :: [string_value()]

Link to this section Functions

@spec to_camel(map :: map()) :: valid_map()
@spec to_camel!(map :: map()) :: map()
@spec to_snake(map :: map()) :: valid_map()
@spec to_snake!(map :: map()) :: map()