Toolbelt v0.3.1 Toolbelt.Map

A set of tools and utilities for working on built-in Maps.

Summary

Functions

Similar to Enum.filter, but produces a map instead of a keyword list

This function works like Enum.map, but produces a new map instead of a keyword list

Just like Map.map, except that nested maps within the given map will be tranversed and also transformed

Similar to Maplike.merge_deep, but only merges on nested maps

Creates a new map from another map with only keys in it that have the given prefix

Similar to Kernel.put_in/3, but creates new maps if nil is returned while traversing the path

Converts the given map and all of its child maps to keyword lists

Functions

delete(xA, xB)

See Map.delete/2.

drop(xA, xB)

See Map.drop/2.

each(map, fun)
equal?(xA, xB)

See Map.equal?/2.

fetch(xA, xB)

See Map.fetch/2.

fetch!(xA, xB)

See Map.fetch!/2.

filter(map, pred)

Similar to Enum.filter, but produces a map instead of a keyword list.

from_struct(xA)

See Map.from_struct/1.

get(xA, xB)

See Map.get/2.

get(xA, xB, xC)

See Map.get/3.

get_and_update(xA, xB, xC)

See Map.get_and_update/3.

get_and_update!(xA, xB, xC)

See Map.get_and_update!/3.

get_lazy(xA, xB, xC)

See Map.get_lazy/3.

has_key?(xA, xB)

See Map.has_key?/2.

keys(xA)

See Map.keys/1.

map(m, fun)

This function works like Enum.map, but produces a new map instead of a keyword list.

map_deep(m, callback)

Just like Map.map, except that nested maps within the given map will be tranversed and also transformed.

map_keys(m, fun)
map_keys_deep(m, fun)
map_values(m, fun)
map_values_deep(m, fun)
merge(xA, xB)

See Map.merge/2.

merge(xA, xB, xC)

See Map.merge/3.

merge_deep(a, b)

Similar to Maplike.merge_deep, but only merges on nested maps.

new()

See Map.new/0.

new(xA)

See Map.new/1.

new(xA, xB)

See Map.new/2.

pick_prefixed(map, prefix)

Creates a new map from another map with only keys in it that have the given prefix.

pop(xA, xB)

See Map.pop/2.

pop(xA, xB, xC)

See Map.pop/3.

pop_lazy(xA, xB, xC)

See Map.pop_lazy/3.

put(xA, xB, xC)

See Map.put/3.

put_in_create(map, list, val)

Similar to Kernel.put_in/3, but creates new maps if nil is returned while traversing the path.

put_new(xA, xB, xC)

See Map.put_new/3.

put_new_lazy(xA, xB, xC)

See Map.put_new_lazy/3.

replace(xA, xB, xC)

See Map.replace/3.

replace!(xA, xB, xC)

See Map.replace!/3.

size(xA)

See Map.size/1.

split(xA, xB)

See Map.split/2.

take(xA, xB)

See Map.take/2.

to_keyword_deep(map)

Converts the given map and all of its child maps to keyword lists.

to_list(xA)

See Map.to_list/1.

update(xA, xB, xC, xD)

See Map.update/4.

update!(xA, xB, xC)

See Map.update!/3.

values(xA)

See Map.values/1.