extras v0.1.2 Map.Extra
Extra helper functions for Map
Link to this section Summary
Functions
Renames existing key in a Map, raising KeyError if key does not exist
Link to this section Functions
Link to this function
rename_key(map, key, new_key)
Renames existing key in a Map, raising KeyError if key does not exist.
Example:
iex> Map.Extra.rename_key(%{foo: "bar"}, :foo, :baz)
%{baz: "bar"}