Mau.Filters.Collection (mau v0.8.0)

View Source

Collection manipulation filters.

Summary

Functions

Removes nil values from a list.

Checks if a collection contains a specific value.

Formats data structures for display (debugging).

Filters list of maps by field value.

Returns the first element of a collection.

Flattens nested lists into a single list.

Groups a list of maps by a specified field.

Joins elements of a list with a separator.

Returns the keys of a map as a list.

Returns the last element of a collection.

Returns the length of a collection or string.

Extracts field values from a list of maps, filtering out nil values.

Rejects list of maps by field value (opposite of filter).

Reverses a collection.

Returns a slice of a list or string.

Sorts a collection.

Returns the filter specification for this module.

Sums numeric values in a list.

Returns unique elements from a list.

Returns the values of a map as a list.

Functions

compact(value, args)

Removes nil values from a list.

contains(value, args)

Checks if a collection contains a specific value.

dump(value, args)

Formats data structures for display (debugging).

filter(value, args)

Filters list of maps by field value.

first(value, args)

Returns the first element of a collection.

flatten(value, args)

Flattens nested lists into a single list.

group_by(value, args)

Groups a list of maps by a specified field.

join(value, args)

Joins elements of a list with a separator.

keys(value, args)

Returns the keys of a map as a list.

last(value, args)

Returns the last element of a collection.

length(value, args)

Returns the length of a collection or string.

map(value, args)

Extracts field values from a list of maps, filtering out nil values.

reject(value, args)

Rejects list of maps by field value (opposite of filter).

reverse(value, args)

Reverses a collection.

slice(value, args)

Returns a slice of a list or string.

sort(value, args)

Sorts a collection.

spec()

Returns the filter specification for this module.

sum(value, args)

Sums numeric values in a list.

uniq(value, args)

Returns unique elements from a list.

values(value, args)

Returns the values of a map as a list.