Nested (nested_ex v0.1.0)
Library to work with nested maps Elixir reimplementation of Erlang library nested
Summary
Functions
Examples
iex> Nested.get(%{test: :rest}, [:test] )
:rest
iex> Nested.get(%{}, [:a])
nil
iex> Nested.get(%{a: %{b: 1}}, [:a,:b])
1
iex> Nested.get(%{a: %{b: 1}}, [:a,:c])
nil
iex> Nested.get(%{a: %{b: 1}}, [:c], 3)
3
Functions
Link to this function
append(map, path, value)
Link to this function
delete(map, list)
Link to this function
fetch(map, path)
Link to this function
fetch!(map, path)
Link to this function
get(map, list)
Examples
iex> Nested.get(%{test: :rest}, [:test] )
:rest
iex> Nested.get(%{}, [:a])
nil
iex> Nested.get(%{a: %{b: 1}}, [:a,:b])
1
iex> Nested.get(%{a: %{b: 1}}, [:a,:c])
nil
iex> Nested.get(%{a: %{b: 1}}, [:c], 3)
3
Link to this function
get(map, list, default)
Link to this function
has_key?(map, list)
Link to this function
keys(map, list)
Link to this function
put(map, list, value)
Link to this function
update(map, path, default, valueOrFun)
Link to this function