sylon_utils v0.1.3 SylonUtils.NestedMapFilter

Documentation for NestedFilter.

Link to this section Summary

Functions

Take a (nested) map and filter out any values with specified keys in the keys_to_reject list.

Take a (nested) map and filter out any keys with specified values in the values_to_reject list.

Take a (nested) map and keep any values with specified keys in the keys_to_select list.

Link to this section Types

Link to this type

key()

key() :: any()
Link to this type

keys_to_select()

keys_to_select() :: list()
Link to this type

predicate()

predicate() :: (key(), val() -> boolean())
Link to this type

val()

val() :: any()

Link to this section Functions

Link to this function

drop_by(struct, predicate)

drop_by(map(), predicate()) :: map()
drop_by(list(), predicate()) :: list()
Link to this function

drop_by_key(map, keys_to_reject)

drop_by_key(%{required(any()) => any()}, [any()]) :: %{required(any()) => any()}

Take a (nested) map and filter out any values with specified keys in the keys_to_reject list.

Link to this function

drop_by_value(map, values_to_reject)

drop_by_value(%{required(any()) => any()}, [any()]) :: %{
  required(any()) => any()
}

Take a (nested) map and filter out any keys with specified values in the values_to_reject list.

Link to this function

take_by(map, keys_to_select)

take_by(map(), keys_to_select()) :: map()
Link to this function

take_by_key(map, keys_to_select)

take_by_key(%{required(any()) => any()}, [any()]) :: %{required(any()) => any()}

Take a (nested) map and keep any values with specified keys in the keys_to_select list.