Liquex.Represent (liquex v0.15.0)

Copy Markdown View Source

Helper methods for maps

Summary

Functions

Expands a previously represented object.

Convert any object and deeply maps atom keys to strings

Functions

expand(value)

@spec 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.

represent(value, lazy \\ false)

@spec 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.