Liquex.Represent (liquex v0.10.2) View Source

Helper methods for maps

Link to this section Summary

Functions

Expands a previously represented object.

Convert any object and deeply maps atom keys to strings

Link to this section Functions

Specs

expand(term()) :: term()

Expands a previously represented object.

Useful when the represented object contains lazy fields. This can be useful for generating JSON values from a represented object. For example, if you had a dump filter that dumped a value to the page as JSON, you would use this function so that lazy functions get represented correctly instead of as functions.

Link to this function

represent(value, lazy \\ false)

View Source

Specs

represent(any(), boolean()) :: any()

Convert any object and deeply maps atom keys to strings

The value deep determines if it should eagerly represent the object. If set to false, it will return a function for any nested objects.

Lazy values are automatically evaluated in the Liquid rendering engine.