Enumerati (enumerati v0.0.8)

Filter and order an enumerable collection of structs

Link to this section Summary

Link to this section Types

Specs

attr_name() :: atom()
Link to this type

attr_value()

Specs

attr_value() :: term()

Specs

filters() :: [{attr_name(), attr_value() | [attr_value()]}]

Link to this section Functions

Link to this function

filter(items, filters)

Specs

filter([struct()], filters()) :: [struct()]
Link to this function

order(items, sort_by)

Specs

order([struct()], [attr_name() | {attr_name(), :asc} | {attr_name(), :desc}]) ::
  [struct()]