Liquid v0.3.0 Liquid.Filters.Functions

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

Summary

Functions

abs(input)
append(input, operand)
capitalize(input)
ceil(input)
ceil(input, precision)
date(input, format \\ "%F %T")
default(input, default_val \\ "")

Specs

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

divided_by(input, operand)
downcase(input)

Specs

downcase(any) :: String.t

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

escape(input)
escape_once(input)
first(array)
floor(input)
floor(input, precision)
join(array, separator \\ " ")
last(array)
lstrip(arg)
map(array, key)
minus(value, operand)
modulo(input, operand)
newline_to_br(arg)
plus(value, operand)
prepend(string, addition)
remove(arg1, arg2)
remove_first(string, operand)
replace(string, from, to \\ "")
replace_first(string, from, to \\ "")
reverse(array)
round(input)
round(input, precision)
rstrip(arg)
size(input)
slice(list, range)
slice(list, from, to)
sort(array)
sort(array, key)
split(arg1, arg2)
strip(arg)
strip_html(input)
strip_newlines(arg)
times(value, operand)
truncate(input, l \\ 50)
truncatewords(input, words \\ 15)
uniq(array)
uniq(array, key)
upcase(input)
url_encode(input)