Liquid v0.9.1 Liquid.Filters.Functions View Source

Structure that holds all the basic filter functions used in Liquid 3.

Link to this section Summary

Link to this section Functions

Link to this function

date(input, format \\ "%F %T") View Source

Link to this function

default(input, default_val \\ "") View Source
default(any(), any()) :: any()

Allows you to specify a fallback in case a value doesn’t exist. default will show its value if the left side is nil, false, or empty

Link to this function

divided_by(input, operand) View Source

Link to this function

downcase(input) View Source
downcase(any()) :: String.t()

Makes each character in a string lowercase. It has no effect on strings which are already all lowercase.

Link to this function

join(array, separator \\ " ") View Source

Link to this function

pluralise(input, single, plural) View Source

Link to this function

pluralize(input, single, plural) View Source

Returns a single or plural word depending on input number

Link to this function

prepend(string, addition) View Source

Link to this function

remove_first(string, operand) View Source

Link to this function

replace(string, from, to \\ "") View Source

Link to this function

replace_first(string, from, to \\ "") View Source

Link to this function

truncate(input, l \\ 50, truncate_string \\ "...") View Source

Link to this function

truncatewords(input, words \\ 15) View Source